14

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)

Ammar Mujeeb
  • 1,222
  • 18
  • 21

1 Answers1

28

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>.

Ben Campbell
  • 4,298
  • 2
  • 29
  • 33
  • 1
    running "git fetch origin" within the working directory did the job! – Ammar Mujeeb Oct 15 '15 at 05:30
  • 1
    How to do it without Terminal, in Xcode: http://stackoverflow.com/questions/33527579/xcode-7-doesnt-show-new-remote-branches-using-git – Rebeloper Apr 05 '17 at 10:33
  • Is fetch would remove my stashed changes? Or it will be there only I have some very Imp stash changes but also I have to perform fetch to get a new working branch in synch – Akshay Digrase Jun 27 '19 at 14:35