Xcode 7 doesn't show new remote branches using Git

自作多情 提交于 2019-12-10 02:45:01

问题


In Xcode 7, after creating a new remote branch using Jira/Stash, when I pull master, the new branch used to show up as an optional origin branch. Now newer branches don't show up at all, so creating a new local branch isn't as easy.

Before you could go to Source Control > hover over your current working copy > select "Switch to Branch" and scroll to see the new origin/ branch. Once that was selected, Xcode automatically created a local branch.

Now I have to manually name/create a new branch locally and push it up (Create) the remote branch which can cause a lot of conflicts if you're working copy isn't master.

Is there a way to force Xcode to see all the remote branches via the Terminal, or by something I'm missing in Xcode?


回答1:


Now you need to tick Fetch and Refresh Status




回答2:


Ok, so as of Xcode 7.1.1, it looks like the way to do this is to:

1) Create your branch in Jira/Stash

2) In Xcode, go to Source Control

3) Select "Pull"

4) Click on the dropdown and you'll see the new "origin/..." branch

5) select the new branch and pull

6) go to Source Control, hover over your working copy, and select "Switch to Branch..."

7) find the new origin branch in the origin section and you'll create a new local branch

Some IDEs like Visual Studio may require you to pull "master" to get the new origin branches, but this seems to be the way it's done now in Xcode.

UPDATE: It appears I didn't have "Refresh server status automatically" checked which would eliminate most of these steps! (found in Xcode -> Preferences -> Source Control .. unless this was recently added in Xcode 7.3)



来源:https://stackoverflow.com/questions/33527579/xcode-7-doesnt-show-new-remote-branches-using-git

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