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

Re: [feature suggestion] Add 'git stash export', 'git stash import' commands to allow to backup stash externally

From
Johannes Sixt <j6t@kdbg.org>
Date
May 6, 2021, 06:43 UTC
Message-ID
<35877543-93b8-00f8-692e-09a06d4679aa@kdbg.org>
In-Reply-To
<e75f000b-e376-45d5-ee5a-2a555076a3d9@rawbw.com>
Am 06.05.21 um 08:12 schrieb Yuri:
Show 12 quoted lines
> On 5/5/21 11:07 PM, Johannes Sixt wrote:
>> I would argue that you are doing something wrong if your stashes are
>> particularly valuable. If you regularly revert temporary, but precious
>> work, then you should commit the work and mark it with a branch tip or
>> tag.
>>
> 
> No, it is work in progress. I begin to work on some modification or
> update, discover some issue, and stash the update until this issue is
> resolved,
> 
> It could take days, weeks, months to resolve them.

I know. But, as I said, when you turn away from your current work, which is precious, then you should make a commit, in particular, when you can forsee that you might not be able to come back soon.

A 'git stash' is really only intended as a short-term make-the-worktree-temporarily-clean auxiliary storage. It is not intended as a long-term storage. For long-term storage, use branches. "Short term" is measured in seconds (rebase --autostash), minutes, perhaps hours, but certainly not weeks or months.

At least, that's how I understand (and use) it.
-- Hannes
Previous: YuriNext: Yuri
Message 7 of 16 in “[feature suggestion] Add 'git stash export', 'git stash import' commands to allow to backup stash externally”
  1. YuriMay 5, 2021
  2. Randall S. BeckerMay 5, 2021
  3. YuriMay 5, 2021
  4. Junio C HamanoMay 6, 2021
  5. Johannes SixtMay 6, 2021
  6. YuriMay 6, 2021
  7. Johannes SixtMay 6, 2021
  8. YuriMay 6, 2021
  9. Junio C HamanoMay 6, 2021
  10. YuriMay 6, 2021
  11. Junio C HamanoMay 6, 2021
  12. Felipe ContrerasMay 6, 2021
  13. Felipe ContrerasMay 6, 2021
  14. YuriMay 6, 2021
  15. Felipe ContrerasMay 6, 2021
  16. Theodore Ts'oMay 6, 2021

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.