Tips for a disciplined git workflow
@cobra2 but really you should learn to embrace history editing in git. The ivory tower concept of history as an immutable truth is insufferable. If editing your history makes version control more useful to you, then why wouldn't you do it?
Like @sir mentioned, I wouldn't edit something in my stable or release branches, but it makes sense to clean up your history before it goes out to the rest of the team or the rest of the world.
I find myself doing a lot of reorganization of commits—rebasing, cherry picking, all sorts of editing—before merging into long-term or important branches.
@sir an alternative to the "fixup" commit followed by a rebase is to stage the changes and then do 'git commit --amend', which is arguably less work.
@melentye that only works if the last commit is the one that needs fixing
cmpwn.com is a private Mastodon instance for friends of SirCmpwn.