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

git stash changes ORIG_HEAD

From
NKNorbert Kiesel <nkiesel@gmail.com>
Date
Jan 25, 2019, 00:22 UTC
Message-ID
<CAM+g_NvpqPJusmwt1ODQcFhOmphs2U_fkPPxwzv540-6ON=PJw@mail.gmail.com>
Hi,
I monitor a couple of Git repos by reviewing changes via:

% git pull % git log -p -w --no-merges ORIG_HEAD..

This works wonderfully for me. However, sometimes I have pending changes in my repo (because I did not yet committed them to a new branch). I thought I could simply use

% git pull --rebase --autostash % git log -p -w --no-merges ORIG_HEAD..

However, this does not work as intended because stashing moves ORIG_HEAD. Right now I use

% orig=$(git rev-parse HEAD) % git pull --rebase --autostash % git log -p -w --no-merges orig..

Is it really necessary that ORIG_HEAD is moved while stashing? This does defeat it's purpose because it's always identical to HEAD after the stash is applied. Or could we have an option to not do that? Or is there already another symbolic name I could use?

Best,
  Norbert
Message 1 of 1 in “git stash changes ORIG_HEAD”
  1. Norbert KieselJan 25, 2019

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.