[英]git: I merged master into develop, now what?
I'm a one man shop and I've been working on a development branch for quite a while. 我是一个单人商店,并且我已经在开发部门工作了一段时间。 I wanted to merge the branches and get back to one branch...master.
我想合并分支,然后回到一个分支...大师。 Somehow, and I'm not sure how, I merged the branches and now I'm on develop.
不知如何,我不确定如何合并分支,而现在正在开发中。
Should I somehow delete one of the branches? 我应该以某种方式删除其中一个分支吗?
How do I fix this to have one branch and it be master? 如何解决这个问题,使其拥有一个分支并且成为主分支?
git checkout master
The above command will put you in the master branch 上面的命令将使您进入master分支
git merge develop
Above will bring whatever is in the develop branch into your master branch 以上将把开发分支中的内容带入您的主分支
git branch -d develop
Above will delete the develop branch 上面将删除开发分支
However, i suggest keeping the develop branch. 但是,我建议保留开发分支。
Commit and push your changes on your current branch then do: 在当前分支上提交并推送您的更改,然后执行:
git merge development
git checkout development
git merge master
git branch -D development
I would like to add these for your convenience. 为了方便起见,我想添加这些内容。 When you are going with continuous development, it's better you follow a particular branching model.
在进行持续开发时,最好遵循特定的分支模型。 I think git-flow will be one model suits for you.
我认为git-flow将是适合您的一种模型。 Or you can follow your own convenient one.
或者,您也可以按照自己方便的方式操作。
The key points you want to know are 您想知道的关键点是
For your particular question, I would answer this way. 对于您的特定问题,我会以这种方式回答。
git checkout master
git pull development
I don't recommend you to delete development branch. 我不建议您删除开发分支。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.