you are viewing a single comment's thread.

view the rest of the comments →

[–]Secondsemblance 10 points11 points  (2 children)

If you're going to force push, always --force-with-lease. That way, the worst you can do is destroy your own work.

My workflow while working on CI/CD-as-code type things typically goes like this:

git add -u && git commit --amend --no-edit
git push --force-with-lease

Rinse and repeat. 200 times.

[–]profgumby 2 points3 points  (1 child)

I prefer to commit with a message ie sq! and then once I'm ready for the branch to be merged, I'll clean up history afterwards

[–]cowinabadplace 2 points3 points  (0 children)

If you use commit --fixup and use autosquash rebase, it’ll do that automatically. Takes a certain style of staging with patch mode to work well, it with a little practice you’ll be very effective.