First, the big picture: I\'m trying to write a git post-receive script for a Redmine / Gitolite server I\'m running. As per various recommendations, I\'m creating a bare and loc
Your fetch hasn't updated the master
branch, only FETCH_HEAD
(see "What does FETCH_HEAD in Git mean?").
As mentioned in "how do I pull to a bare repository?", you should do a:
git fetch origin master:master
Or, for all the branches:
git fetch origin +refs/heads/*:refs/heads/*
Colin D Bennett added:
If you want to fetch these on a regular basis, you should consider:
git config remote.origin.fetch +refs/heads/*:refs/heads/*
which will allow you to type
git fetch
to sync your branches with the remote.
Note that this make sense only in a bare repository where local branches are not supposed to be edited.