I have an odd problem with Git where somewhere I have some reference to an old branch called 2013.rel25, but I have no idea where it is. This is a branch that was merged and deleted on origin long ago.
C:\project>git pull
fatal: Couldn't find remote ref refs/heads/2013.rel25
C:\project>git branch -a
* master
remotes/origin/HEAD -> origin/master
remotes/origin/master
C:\project>git remote prune origin
C:\project>git pull
fatal: Couldn't find remote ref refs/heads/2013.rel25
How can I find out what is referencing this dead branch that exists neither locally, or on the remote? And then, how can I remove or fix the reference so I can go back to pulling from origin/master to local master?
EDIT: My .git/config file references it specifically as a fetch head. I guess I'll just remove it manually:
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
hideDotFiles = dotGitOnly
[remote "origin"]
url = [email protected]:somebody/project.git
fetch = +refs/heads/*:refs/remotes/origin/*
fetch = refs/heads/2013.rel25:refs/remotes/origin/2013.rel25
[branch "master"]
remote = origin
merge = refs/heads/master
I couldn't find a way to remove this via the command line, so I just edited my Git config file at .git/config and removed this line:
fetch = refs/heads/2013.rel25:refs/remotes/origin/2013.rel25
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