this post was submitted on 02 Sep 2024
56 points (93.8% liked)
Git
2879 readers
3 users here now
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
Resources
Rules
- Follow programming.dev rules
- Be excellent to each other, no hostility towards users for any reason
- No spam of tools/companies/advertisements. It’s OK to post your own stuff part of the time, but the primary use of the community should not be self-promotion.
Git Logo by Jason Long is licensed under the Creative Commons Attribution 3.0 Unported License.
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I do not actually understand the use case of
—keep
over the default—mixed
, which I use regularly to restage patches or fuckups. I very frequently use—hard
to test something out and blow it away without worrying about any changes. This whole conversation is fascinating because it highlights just how different everyone uses git and equally how bad sweeping generalizations like “—hard
is something to avoid” are (without incredibly specific caveats).It seems like
—keep
makes sense if you’re not usingstash
before trying to change history when you have local, uncommitted changes? That might be why it’s not clicking with me; any time I fuck with history Istash
anything local I might want to keep.