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

Re: does a stash *need* any reference to the branch on which it was created?

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 4, 2018, 03:04 UTC
Message-ID
<xmqq4lij6ym4.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<alpine.LFD.2.21.1806021525120.19865@localhost.localdomain>
"Robert P. J. Day" <rpjday@crashcourse.ca> writes:
>   i realize that, when you "git stash push", stash graciously saves
> the branch you were on as part of the commit message, but does any
> subsequent stash operation technically *need* that branch name?

It is not "saves", but "the message it automatically generates includes <branch> and <commit title> as a human readable reminder".

"git stash" does not have to read that message, as it is not prepared to read and understand what you wrote after you ran your own "git stash push -m 'my random message'" anyway. It is merely for your consumption, especially when it appears in "git stash list".

Previous: Thomas GummererNext: Robert P. J. Day
Message 3 of 4 in “does a stash *need* any reference to the branch on which it was created?”
  1. Robert P. J. DayJun 2, 2018
  2. Thomas GummererJun 2, 2018
  3. Junio C HamanoJun 4, 2018
  4. Robert P. J. DayJun 4, 2018

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.