I have a script that is running some automated tasks, and it looks like git fetch
is not updating the reference for origin/master
. It is a bit difficult to debug, because this script is run in a server I don't have administrator permissions for (and the administrator is away for a week), and on another user's account (I have read-only access). There's this other question that looks the same, but the .git/config
file already looks like this:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = ################
[branch "my-branch"]
remote = origin
merge = refs/heads/my-branch
The same script is working fine in other machines. I can see a difference in the git version, which is 1.7.1 in the "faulty" machine and 1.8.3 or later in others. Could this be a reason?
EDIT: So, the user that runs the script is sitting on my-branch
, runs git fetch
and then git rev-parse origin/master
gives a very old hash, while I can see from other machines that the repository has been updated. New hashes are accessible, it's just that origin/master
does not point to the right one.