Using Xcode to merge current branch into Master

落爺英雄遲暮 提交于 2019-12-12 11:25:24

问题


Is there a quick way to merge the current working branch into the master branch using Xcode? I'm not clear on what the 'Merge' menu option is doing exactly (it's not exactly labelled clearly), but it seems like it is merging whichever branch you select into your current branch - I guess this is useful when you want to test your changes with the latest codebase from someone else.

When I finish a feature, I would like to merge it in to the master and then continue working on another feature. It seems like I have to switch to the master branch, merge from there, then make another branch from master and work on feature #2 in that one.

Do I have it correct?


回答1:


Yes, that is correct. The "merge" operation in Git takes another branch and merges it into your current branch.

What you are describing (creating a branch for each feature, and merging them into master as you go) is generally referred to as the "feature branch" workflow, and it is a very common one.




回答2:


To use Xcode to merge the current branch into another branch (for example, the develop branch into the master branch), go to Source Control > Your project name and branch > Merge into Branch....

Then just select the branch that you want to merge it into.

You can view the changes and then make the merge. This is a local repository change. You can go to Source Control > Push to push the merge to your remote repository.



来源:https://stackoverflow.com/questions/13129092/using-xcode-to-merge-current-branch-into-master

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