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

Re: git stash merge

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 20, 2015, 18:12 UTC
Message-ID
<xmqqy4lmllct.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CAJmOuEwEgA-9NCtBXjij-rLhsCWMyw+DcRVGo4=0b1V2nC==cA@mail.gmail.com>
Pawel Por <porparek@gmail.com> writes:
Show 7 quoted lines
> I've just upgraded the linux kernel git source tree and I want to
> "pop" my stashed work. I do the following:
> git stash pop
>
> and I got the following message:
> mm/Makefile: needs merge
> unable to refresh index

The symptom indicates that "upgraded the linux kernel git source tree" has not been cleanly completed and has an unmerged entry in the index. That is the first thing "stash pop" tries to check that the source tree does not have any pending change that does not have anything to do with your application of the stash, and you seem to be triggering that safety check.

If your working tree does not have changes of any value, perhaps "git reset --hard && git pull" (or you may even want to resort to "git fetch && git reset --hard origin") to make sure "upgraded the source tree" part truly has cleanly completed may be a good second step to get "stash pop" going. The good first step is to see what local changes you have, of course---perhaps your "upgraded the linux kernel git source tree" conflicted with your local changes that you need to resolve first.

Previous: Pawel Por
Message 2 of 2 in “git stash merge”
  1. Pawel PorApr 20, 2015
  2. Junio C HamanoApr 20, 2015

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.