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

Re: git checkout --autostash and git branch --autopop

From
Denton Liu <liu.denton@gmail.com>
Date
Dec 12, 2019, 18:09 UTC
Message-ID
<20191212180901.GA35927@generichostname>
In-Reply-To
<8ab7d980-9584-4ce7-b4ee-9acac62c030c@www.fastmail.com>
Hi rottis,
On Thu, Dec 12, 2019 at 02:19:50PM +0200, rottis@fea.st wrote:
> Similar to the 'git rebase --autostash', running 'git checkout --autostash' would automatically stash uncommitted changes for the
> current branch.  then running 'git branch --autopop' would automatically apply an automatic stash when switching to a branch that had one.

I currently have a WIP version of this feature but I haven't had enough time to polish it off (tests and docs). The last RFC round can be seen here[1] if you want to test it out. It seems to work well enough for personal use.

[1]: https://lore.kernel.org/git/cover.1571246693.git.liu.denton@gmail.com/
Previous: rottis@fea.stNext: Denton Liu
Message 2 of 7 in “git checkout --autostash and git branch --autopop”
  1. rottis@fea.stDec 12, 2019
  2. Denton LiuDec 12, 2019
  3. Denton LiuDec 12, 2019
  4. Philip OakleyDec 12, 2019
  5. Junio C HamanoDec 13, 2019
  6. Philip OakleyDec 14, 2019
  7. Philip OakleyDec 14, 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.