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)
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.
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.
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).
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>
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With