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

Re: [PATCH] Add 'preserve' subcommand to 'git stash'

From
Nadav Goldstein <nadav.goldstein96@gmail.com>
Date
Jun 18, 2023, 10:57 UTC
Message-ID
<8c3ca631-a33a-a64c-5152-249f6182a5c7@gmail.com>
In-Reply-To
<ZI7SzSuT26XXKzah@ugly>

I see your point, but commits force me to detail the changes (and I know it's good practice).

I just want to give the user another option rather than committing their changes.

If we talking about commits, why use stash at all? why not just commit, push it/create and switch branch, and go back?

I know my argument is not so smart, but I just want to highlight that everything can be done with commits, as this what makes git so powerful :)

Thanks for you reply!
Nadav
On 18/06/2023 12:47, Oswald Buddenhagen wrote:
Show 16 quoted lines
> On Sun, Jun 18, 2023 at 12:05:21PM +0300, Nadav Goldstein wrote:
>> Let me try to explain my motivation:
>> I heavily use stash to set quick points in my code so I could go back 
>> to them (during thought process), and I want to store my changes 
>> quickly and continue from there.
>>
> so why are you (ab-)using stash for that, rather than just committing 
> each time, and later cleaning it by using `reset [--mixed]` and 
> re-committing (or using `rebase --interactive`)? the reflog holds 
> information about "lost" commits (the stash is just a somewhat special 
> reflog, too).
>
> regards,
> ossi
>
>
Previous: Oswald BuddenhagenNext: Junio C Hamano
Message 9 of 10 in “Add 'preserve' subcommand to 'git stash'”
  1. Add 'preserve' subcommand to 'git stash'Nadav Goldstein via GitGitGadget, Jun 16, 2023
  2. Junio C HamanoJun 16, 2023
  3. Oswald BuddenhagenJun 16, 2023
  4. Junio C HamanoJun 16, 2023
  5. Oswald BuddenhagenJun 17, 2023
  6. Junio C HamanoJun 17, 2023
  7. Nadav GoldsteinJun 18, 2023
  8. Oswald BuddenhagenJun 18, 2023
  9. Nadav GoldsteinJun 18, 2023
  10. Junio C HamanoJun 19, 2023

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.