Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 7 doesn't show new remote branches using Git

Tags:

git

xcode

ios

jira

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?

like image 569
whyoz Avatar asked Nov 04 '15 16:11

whyoz


2 Answers

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) enter image description here

like image 116
whyoz Avatar answered Oct 31 '22 15:10

whyoz


Now you need to tick Fetch and Refresh Status

enter image description here

like image 26
Sh_Khan Avatar answered Oct 31 '22 16:10

Sh_Khan