GitHub基本提交操作
来源:互联网 发布:u盘检测工具 知乎 编辑:程序博客网 时间:2024/05/29 13:33
1.在网页版的GitHub下新建仓库
然后
git clone (你的仓库名git@github.com:xxx/xxx.git
2.在GIT bash终端使用 cd 命令切换进clone的目录
此时可以使用git status看下情况,当然,啥也木有
On branch masterInitial commitnothing to commit (create/copy files and use "git add" to track)
3.这里,初始化一下仓库
git init
4.然后把文件夹中你要添加的东西,使用
git add xxx
5.可以建一个readme.md,markdown格式的文件,使用touch命令
touch README.md
6.将文件加入暂存区,然后使用git commit,-m后的是提交信息,是对本次提交的概述
git commit -m "this is a demo,you can say whatever you'd like to say"
不加-m的话,会弹出一个vi编辑器界面,注意把要说的话在写进去,去除#即可,否则不生效
提交好了可以通过git log 看下日志
7.push
到上一步,GitHub上的仓库还木有被更新,此时需用push命令
git push
Done
坑:
如果clone到一个空仓库,开始不init的话,后面会提示你
*** Please tell me who you are.Run git config --global user.email "you@example.com" git config --global user.name "Your Name"to set your account's default identity.Omit --global to set the identity only in this repository.fatal: empty ident name (for <(NULL)>) not allowed
这时候可能即使你运行这两行了,也没反应。
解决方法是到你这个文件夹的目录,win的话打开隐藏的.git文件夹,config这个文件打开,加入
[user]name=yournameemail=youremail
就好了。。。
0 0
- GitHub基本提交操作
- 提交github操作
- Github 基本操作
- github 基本操作
- github 基本操作
- Github 基本操作
- github基本操作
- 图解GitHub基本操作
- GitHub的基本操作
- 图解GitHub基本操作
- github基本操作
- github的基本操作
- GitHub基本操作指南
- github的基本操作
- 图解GitHub基本操作
- Github基本操作
- Github基本操作
- Github基本操作【学习笔记】
- 世界国家中英文对照表(json格式)
- Kudu:支持快速分析的新型Hadoop存储系统
- 嵌入式audio基础(一)接口
- java telnet客户端 用于连接Windows的Telnet服务器
- ECharts地图显示不完整,只显示南海诸岛问题
- GitHub基本提交操作
- Junit 数据类型匹配处理
- WinMain
- Flume 丢失数据问题
- 关于SpringAOP的初步认识(个人理解)
- Java设计模式之中介者模式
- 火柴棒等式
- 双向链表的基本操作
- C++中的4中类型转换方式