A colleague pushed a new remote branch to origin/dev/homepage and I cannot see it when I run:
$ git branch -r
I still see preexisting remote branches.
I assume this is because my local remote refs are not up-to-date hence when I ran a git pull nothing happened since git pull only pulls on the current working branch correct? Unlike git push which pushes all branches that have changes to the corresponding remote branch?
First, double check that the branch has been actually pushed remotely, by using the command
git ls-remote origin. If the new branch appears in the output, try and give the commandgit fetch: it should download the branch references from the remote repository.If your remote branch still does not appear, double check (in the
ls-remoteoutput) what is the branch name on the remote and, specifically, if it begins withrefs/heads/. This is because, by default, the value ofremote.<name>.fetchis:so that only the remote references whose name starts with
refs/heads/will be mapped locally as remote-tracking references underrefs/remotes/origin/(i.e., they will become remote-tracking branches)