GIT命令

2018-06-27  本文已影响20人  JACK_岩

新建路径: git clone <git路径>

提交修改: git add .

本地提交: git commit -am "添加内容"

提交分支: git push

新建分支:
查看分支:git branch

创建分支:git branch <name>

切换分支:git checkout <name>

(创建+切换分支:git checkout -b <name>)

提交修改: git add .

本地提交: git commit -am "添加内容"

提交分支: git push

要推动当前分支并将远程设置为上游 : git push --set-upstream origin <name>

合并某分支到当前分支:git merge <name>

删除分支:git branch -d <name>

强制更新:
git fetch --all
git reset --hard origin/master
git命令大全:https://blog.csdn.net/halaoda/article/details/78661334

上一篇 下一篇

猜你喜欢

热点阅读