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

Re: [PATCH] git-checkout --push/--pop

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 5, 2007, 06:59 UTC
Message-ID
<7vprxl1v9v.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<200712042204.lB4M4SVB002260@mi1.bluebottle.com>
Nanako Shiraishi <nanako3@bluebottle.com> writes:
> This introduces a branch-stack mechanism to record branch switching in $GIT_DIR/BRANCH_STACK file.  If you are switching to another branch and plan to come back to the original branch soon, add '--push' option to record your current branch.
> When you want to come back, 'git checkout --pop' will switch back to the branch recorded at the top of the stack, while popping it.
>
> Signed-off-by: しらいしななこ <nanako3@bluebottle.com>

Hmph, is this in response to my "I am not sympathtic to 'I have to remember'"?

Funnily enough, I often find myself almost typing pushd/popd when switching branches, so in that sense "git checkout" to switch branches does have some similarity to the notion of pushing and popping.

Matthieu, is this something that forgetful people would find useful?

Having said that, I think there are other push/pop people wanted from you. Hint, hint...

Previous: Nanako ShiraishiNext: Matthieu Moy
Message 8 of 14 in “[RFC] Introduce .git/BRANCH to point to the current branch”
  1. Salikh ZakirovDec 4, 2007
  2. Matthieu MoyDec 4, 2007
  3. Jakub NarebskiDec 4, 2007
  4. Junio C HamanoDec 4, 2007
  5. Matthieu MoyDec 4, 2007
  6. Junio C HamanoDec 4, 2007
  7. git-checkout --push/--popNanako Shiraishi, Dec 4, 2007
  8. Junio C HamanoDec 5, 2007
  9. Matthieu MoyDec 5, 2007
  10. David KågedalDec 5, 2007
  11. Robin RosenbergDec 6, 2007
  12. Salikh ZakirovDec 4, 2007
  13. Junio C HamanoDec 4, 2007
  14. Jakub NarebskiDec 4, 2007

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.