Switching branch on Xcode 9

≯℡__Kan透↙ 提交于 2019-12-02 16:27:28
  • Press ⌘2 to open the new Source Control Navigator.
  • Right-click on the master icon.

To switch to a different branch

  • Right-click on a non-current branch
  • Choose Checkout...
  • Press or click on the Checkout button.

Expose the left side window (Navigator) in your Xcode by selecting this option (you will see this on the top right side of your Xcode window):

Now select the second tab:

Right click on the branch you are intending to checkout and hit the checkout button from menu:

It seems that Apple has moved Source Controls feature like change branch, version history to separate tab in Navigator area for Xcode 9.x

Below are step to perform branch switch :

  1. Open the Navigator area (if it is hidden) by pressing left pane window present on top right of Xcode or use shortcut cmd + 2

  1. In Source control navigator you can see Branches, Tag present for your project.

  1. Now, if you want to switch branch then select the branch to switch and right click on it.

  2. Select Checkout. This will prompt an alert Do you want to check out “<branch name>”? Select Checkout.

  1. Now this will switch your branch to selected one after sometime.

Note: In order to switch between branches you need to commit or discard changes done in project.

  1. You can even see Log history by selecting branch. Commit history can be viewed based on last 24 hours, last 7 days and last 30 days.

1) Press show navigator button (top right corner of Xcode):

2) Show the project navigator, expand Remotes folder:

3) Expand the origin folder, right click the branch you want to use, and click Checkout....

Follow the below link for the clear explanation of each and every functionality like, Commit, pull, push, etc.

https://www.raywenderlich.com/153084/use-git-source-control-xcode-9

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