{"thread":{"id":"15134","subject":"Git Errors for local refs","startedAt":"2008-08-21T14:12:42Z","lastAt":"2008-08-21T20:24:14Z","messageCount":2,"participants":["Brian Loomis","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"87983","messageId":"63013335-CBB4-43E5-9538-204828805849@mac.com","threadId":"15134","inReplyTo":null,"subject":"Git Errors for local refs","fromName":"Brian Loomis","fromEmail":"brianloomis1@mac.com","sentAt":"2008-08-21T14:12:42Z","receivedAt":"2008-08-21T14:12:42Z","isPatch":false,"sender":{"key":"brianloomis1@mac.com","avatar":null},"body":"I'm getting the error trying to do a pull from a repos I set up on  \nGitHub yesterday.\n\nerror: some local refs could not be updated; try running\n'git remote prune origin' to remove any old, conflicting branches\n\nI've run the  'git remote prune origin' but still get the error doing  \nthe pull.\n\nAny ideas how to resolve this?  Google seems to show me nothing on  \nthis and I have also looked at the manual.\n\nI've run the git fsck and git gc but still seem to get these.\n\nTIA\n\nBrian Loomis\n"},{"id":"88033","messageId":"20080821202414.GD27705@coredump.intra.peff.net","threadId":"15134","inReplyTo":"63013335-CBB4-43E5-9538-204828805849@mac.com","subject":"Re: Git Errors for local refs","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-08-21T20:24:14Z","receivedAt":"2008-08-21T20:24:14Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Aug 21, 2008 at 08:12:42AM -0600, Brian Loomis wrote:\n\n> I'm getting the error trying to do a pull from a repos I set up on GitHub \n> yesterday.\n>\n> error: some local refs could not be updated; try running\n> 'git remote prune origin' to remove any old, conflicting branches\n>\n> I've run the  'git remote prune origin' but still get the error doing the \n> pull.\n>\n> Any ideas how to resolve this?  Google seems to show me nothing on this \n> and I have also looked at the manual.\n\nProbably google turned up nothing because the error message is new in\nthe latest version of git.\n\nGenerally what happens is that the remote used to have some branch\n\"foo\", so you have \"refs/remotes/origin/foo\", but now they deleted it in\nfavor of \"foo/bar\", so the new remote tracking branch\n\"refs/remotes/origin/foo/bar\" conflicts with \"refs/remotes/origin/foo\"\n(and the conflict, as you might guess, is an artifact of the storage\nmodel for refs, which matches the filesystem semantics).\n\nRunning 'git remote prune origin' will see that 'foo' no longer exists\nat your origin and remove your refs/remotes/origin/foo, and the next\nfetch will work fine.\n\nBut in this case (and I _thought_ every other, but perhaps we are\nmissing one), the full output should have a clue as to what is causing .\nIn a test repo, I get:\n\n  $ git fetch\n  error: 'refs/remotes/origin/foo' exists; cannot create 'refs/remotes/origin/foo/bar'\n  From /home/peff/foo/parent/\n   ! [new branch]      foo/bar    -> origin/foo/bar  (unable to update local ref)\n   error: some local refs could not be updated; try running\n    'git remote prune origin' to remove any old, conflicting branches\n\nAre you seeing any other error output from your fetch? If so, what does\nit say?\n\n-Peff\n"}]}