I have a local repository that pulls from a remote one. Running git pull
as well as git fetch; git merge FETCH_HEAD
used to perform exactly the same action, as is expected from the description of git pull
:
DESCRIPTION
Incorporates changes from a remote repository into the current branch. In its default mode, git pull is shorthand for git fetch followed by git merge FETCH_HEAD.
Presently, and unexpectedly, running git fetch
stopped updating the FETCH_HEAD
reference correctly. FETCH_HEAD
is now stuck to an old commit. Running git fetch
downloads all changes to remote tracked branches, but FETCH_HEAD remains unchanged regardless of the branch in which it is run.
# currently in branchone
> git fetch
# branchone is up to date since...
> git rev-parse branchone
593539e8a98ba5980d4b645db3b0f506bb9b6a2c
# ...its in the same commit as the remote branch
> git rev-parse origin/branchone
593539e8a98ba5980d4b645db3b0f506bb9b6a2c
# however FETCH_HEAD shows something different
> git rev-parse FETCH_HEAD
37301df96597ac037f8e7e846fea6fc7df77bea5
git pull
still performs the correct task. However running git fetch; git merge FETCH_HEAD
will do something different since FETCH_HEAD
points to an incorrect commit.
Is there any setting or issue that could be messing with git fetch
behavior?