top | item 39883790

(no title)

QuantumSeed | 1 year ago

I usually keep all my work in a stash until I'm ready to create the PR. I used to preface my intermediate commits with "WIP -" and then reset the branch and re-commit everything when I was ready to create the PR, but that was just too much effort

discuss

order

doix|1 year ago

You don't need to reset the branch. Using rebase -i, you can squash all your WIP commits that way.

You can also use it to split and individually pick changes if you want to clean up your commits.

You can automatically fix up commits after review commits using git absorb [1].

[1] https://github.com/tummychow/git-absorb

mb7733|1 year ago

As a big fan of interactive rebase, when cleanint up a chunk of commits I do a reset as reset the OP described (smetimes mid rebase). It's convenient for inspecting all your changes together, and you can pick and choose changes into different commits easily too... Pretty much equivalent, but I find it more straightforward for some things.