Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

how many times have you stashed, and in what stages of development, and when you try to apply them later, will they be in order and will they work on the codebase as it has changed? also, do you even remember you stashed, and is there a log longer than 1 line?

stash is a quick hack, and is useful as a quick hack, but commits just work better.



Still no different than branches you forget to go back to. If you want the exact same behavior, than instead of

    stash apply
use

    stash branch PickingBackUpStash 

That said, the majority of my uses of stash are "git stash; git pull; git stash apply" Or, alternatively, "git stash --keep-index; build; test; commit; git stash pop"

The whole point is I am not leaving the stash for long. If I have left a stash dormant for some time, I likely just drop it. Similar with branches.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: