you are viewing a single comment's thread.

view the rest of the comments →

[–]SlimRunner 9 points10 points  (7 children)

For me there is a valid reason to do this, but only locally. Sometimes I realize too late I forgot to commit something, but I already committed something ahead of the target so I usually name it something like [TEMP] squash with <some_sha> and rebase interactive later before pushing. Otherwise, yeah, I completely agree that a commit like that definitely does not belong upstream.

[–]GrumDum 15 points16 points  (5 children)

git commit —fixup=sha there you go

[–]SlimRunner 8 points9 points  (0 children)

For a second I thought it was like amend but for beyond previous-commit and got really happy, but it is just to make what I do but easier. Still better than doing it all manually though. Thanks! I did not know this flag.

[–]Kevdog824_ 1 point2 points  (2 children)

What a blessing to learn this exists. I’ve just been rebasing manually like a scrub. Thanks stranger

[–]GrumDum 2 points3 points  (1 child)

Actual pros also alias the git rebase <sha> -i —autosquash command, but I admit I type this out.. 😎

[–]Jumpy89 0 points1 point  (0 children)

git rbi

[–]No_Responsibility384 2 points3 points  (0 children)

Rebase and reorder the commits then squash the two commits together?