码迷,mamicode.com
首页 > 其他好文 > 详细

Git提交代码的正确姿势

时间:2019-10-28 10:50:50      阅读:287      评论:0      收藏:0      [点我收藏+]

标签:步骤   情况下   导致   解决   for   代码   push   没有   master   

按此步骤基本没问题,中间有conflict,需要手动解决。

1、git stash

2、git pull

3、git stash pop

4、git add --xxx

5、git commit -m "msg"

6、git pull -r 或 git pull -rebase

7、git push origin HEAD:refs/for/master

 

不rebase可能会导致在没有主动创建分支的情况下,出现各种分支和merge。

Git提交代码的正确姿势

标签:步骤   情况下   导致   解决   for   代码   push   没有   master   

原文地址:https://www.cnblogs.com/eryun/p/11750685.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!