From: Jeff King <peff@peff.net>
To: Brian Loomis <brianloomis1@mac.com>
Cc: git@vger.kernel.org
Subject: Re: Git Errors for local refs
Date: Thu, 21 Aug 2008 16:24:14 -0400 [thread overview]
Message-ID: <20080821202414.GD27705@coredump.intra.peff.net> (raw)
In-Reply-To: <63013335-CBB4-43E5-9538-204828805849@mac.com>
On Thu, Aug 21, 2008 at 08:12:42AM -0600, Brian Loomis wrote:
> I'm getting the error trying to do a pull from a repos I set up on GitHub
> yesterday.
>
> error: some local refs could not be updated; try running
> 'git remote prune origin' to remove any old, conflicting branches
>
> I've run the 'git remote prune origin' but still get the error doing the
> pull.
>
> Any ideas how to resolve this? Google seems to show me nothing on this
> and I have also looked at the manual.
Probably google turned up nothing because the error message is new in
the latest version of git.
Generally what happens is that the remote used to have some branch
"foo", so you have "refs/remotes/origin/foo", but now they deleted it in
favor of "foo/bar", so the new remote tracking branch
"refs/remotes/origin/foo/bar" conflicts with "refs/remotes/origin/foo"
(and the conflict, as you might guess, is an artifact of the storage
model for refs, which matches the filesystem semantics).
Running 'git remote prune origin' will see that 'foo' no longer exists
at your origin and remove your refs/remotes/origin/foo, and the next
fetch will work fine.
But in this case (and I _thought_ every other, but perhaps we are
missing one), the full output should have a clue as to what is causing .
In a test repo, I get:
$ git fetch
error: 'refs/remotes/origin/foo' exists; cannot create 'refs/remotes/origin/foo/bar'
From /home/peff/foo/parent/
! [new branch] foo/bar -> origin/foo/bar (unable to update local ref)
error: some local refs could not be updated; try running
'git remote prune origin' to remove any old, conflicting branches
Are you seeing any other error output from your fetch? If so, what does
it say?
-Peff
prev parent reply other threads:[~2008-08-21 20:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-21 14:12 Git Errors for local refs Brian Loomis
2008-08-21 20:24 ` Jeff King [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080821202414.GD27705@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=brianloomis1@mac.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).