How do I merge a branch into a master in github?

倖福魔咒の 提交于 2019-12-20 09:59:55

问题


I created a repo and github, and pushed my files to it. Then had a colleague create a branch and make changes. I want to merge the branch to master.

What steps do I take?


回答1:


Please do following set of commands in order to merge with the master, Assuming that you are in branch testBranch and you want to merge the changes with the master,

First checkout to master branch,

git checkout master

Now pull the latest changes in master,

git pull origin master

Merge with the testBranch

git merge testBranch

Push the changes to master

git push origin master

That's it, you are done.



来源:https://stackoverflow.com/questions/33503686/how-do-i-merge-a-branch-into-a-master-in-github

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!