开发者

Git Fundamentals - Merging back into master

I'm ne开发者_运维知识库w to git.

I made a branch, did my changes, and now I want to merge back to master to make them "permanent".

So I did git merge 1.2 which reported as already up-to-date, did the same on master to the same result, and tried merge -v HEAD master which gave me a slightly different up-to-date message.

So is what I did correct? Should I be doing something else? How do I switch back to the master branch?


You need to be on the master branch to merge into it.

git checkout master
git merge some_development_effort


You have your Master branch and then you have the branch which you are making changes on. In order to merge the branch with changes back into Master you need to be on Master.

So first checkout Master and then run your merge:

git checkout master    
git merge 1.2
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜