git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: bug during checkout of remote branch and uncommited changes ?

From
Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Date
Jul 7, 2017, 17:13 UTC
Message-ID
<20170707171300.kd5hqcujbvubw73q@ltop.local>
In-Reply-To
<xmqqd19cckfw.fsf@gitster.mtv.corp.google.com>
On Fri, Jul 07, 2017 at 08:53:39AM -0700, Junio C Hamano wrote:
Show 7 quoted lines
> Luc Van Oostenryck <luc.vanoostenryck@gmail.com> writes:
> 
> > 	$ git reset --hard
> > 	patching file afile.c
> 
> Is that a message from something?  It does not sound like something
> "git reset --hard" would say.
Indeed, sorry. This is the result of a 'git diff | patch -p1 -R' to
which I'm used since a long time ago. I have no more reason to use
it but ... habits ... :)
 
But doing 'git reset --hard' gives exactly the same result.
Show 7 quoted lines
> > 	$ git co <abranch>
> > 	fatal: Not tracking: ambiguous information for ref refs/remotes/<aremote>/<abranch>
> >
> > What can be ambiguous here?
> 
> I think the message "Not tracking" is given when there is a remote
> other than <aremote> that also has <abranch>.
Mmmm, no I don't have that.
At this point there is (in .git):
	refs/remotes/<aremote>/<abranch>
	refs/heads/<abranch>
The second one didn't existed before the checkout attempt, of course.
	
> Between the time you
> got the message and the time you tried to checkout <abranch>, did
> anything happen to cause the second attempt succeed?

No. At least here, the scenario I gave allow to fully reproduce the problem.

Would you like any other information?
-- Luc
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 5 in “bug during checkout of remote branch and uncommited changes ?”
  1. Luc Van OostenryckJul 7, 2017
  2. Junio C HamanoJul 7, 2017
  3. Luc Van OostenryckJul 7, 2017
  4. Junio C HamanoJul 7, 2017
  5. Luc Van OostenryckJul 7, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.