GIT的常用命令

2019-02-13  本文已影响0人  Felix_Zhou

代码提交

第一步、代码添加到git缓存

git add .    或者 git  add --all

第二步、添加备注

git commit –m “备注”

第三步、拉取远程仓库的代码,并和本地比较.

git pull origin/master --rebase

第四步、查看当前分支的状态

git status

第五步、提交代码到远程分支

git push origin/master

注意:
 如果第四步时,出现当前分支和远程分支有冲突,解决冲突后执行如下操作。
(如果有差异,git status查看当前分支状态,根据状态提示操作)

1.冲突解决后,把修改好的代码添加到缓存

git add .   或者 git add –all

2、跳出rebase(不知道怎么可以git status 有提示)

git rebase –continue

3、执行第五步操作

分支管理

Tag标签(name是标签)


git stash命令(本地临时缓存)


其他常用命令

上一篇 下一篇

猜你喜欢

热点阅读