tummychow / git-absorb

git commit --fixup, but automatic
https://crates.io/crates/git-absorb
BSD 3-Clause "New" or "Revised" License
3.35k stars 59 forks source link

Option to create a `squash!` commit #97

Open jcorbin opened 8 months ago

jcorbin commented 8 months ago

Sometimes you want to plan to edit the squashed commit message a bit, rather than just speed past it in the future rebase.

To that end, creating a squash! ... commit is super useful, otherwise you'll have to remember to edit the autosquash-prepared rebase plan and change a fixup to a squash.

Fwiw I have a small git-fit wrapper I've been using for years, which can also be invoked as git-sit to quickly bang out such commits; it was only on reading your README that I even learned that git commit --fixup and git commit --squash are a thing.

Supposing in a similar vein, amend! mode could/should also be supported, altho I'm also learning about that mode right now as I read up on git commit --fixup=amend:...

tummychow commented 8 months ago

seems reasonable. choosing which commit type to use on a per-commit basis is probably too difficult, but setting it for an entire git-absorb invocation (as a flag or git config) is a pr i'd accept