Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Newly created branch on github not showing in Xcode "switch to branch" option

Tags:

git

github

xcode

I created a branch on github. When i try to switch to this newly created branch from Xcode. Xcode not showing in the "Switch to branch" listing. (Neither in local nor origin)

like image 311
Ammar Mujeeb Avatar asked Oct 14 '15 12:10

Ammar Mujeeb


People also ask

Why branch is not showing in github?

This can happen if your repo has 0 commits. If you make a commit, your current branch will appear when you do: git branch . Show activity on this post. Show activity on this post.

How do I switch between branches in Xcode?

In the navigation pane of the repositories organizer, click the working copy folder for the repository. Click the Switch Branch button at the bottom of the Organizer window. In the Select a Branch dialog, choose the branch you want to use from the pop-up menu. Click OK to confirm the switch.

How do I find my git branch in Xcode?

Navigate to Source Control navigator (the second item on the left sidebar). You will see the name of the current branch next to the project folder's name (in this case, dev).


1 Answers

Synchronization with remotes in git is not automated and must be performed with an command. git fetch origin instructs git to connect to the remote named origin and get a list of refs and associated objects. This would include the new branch on github. At this point you can checkout the branch with git checkout <branch_name>.

like image 124
Ben Campbell Avatar answered Oct 16 '22 20:10

Ben Campbell