I amend my commits all the time too but I don't push my commits to remote after every commit. I push them only when I'm sure that I have done what's necessary and have no second thoughts (mostly at the end of my day or only twice a day). This way I mostly never have to force push as I only have to amend my local commit.
Force push is a bad practice as it can mess up everyone's work if you're working in a big team.
I would suggest to create two different gamend and gamendfp so you force push only when you have to and you're absolutely sure that you're not gonna break someone else's work.
VP of DevRel RapidAPI ❯ Award-winning Web Developer NodeCLI.com ❯ Google Dev Expert Web tech ❯ 2x GitHub Stars Award ❯ WordPress Core Dev ❯ TEDx Speaker ❯ "awesome example for devs" — Satya Nadella
Location
San Francisco Bay Area
Education
EE-CS Engineer turned Software Developer
Work
VP of DevRel (DX Eng., Content & Community) RapidAPI ❯ Google Dev Expert ❯ GitHub Star ❯ NodeCLI.com
I amend my commits all the time too but I don't push my commits to remote after every commit. I push them only when I'm sure that I have done what's necessary and have no second thoughts (mostly at the end of my day or only twice a day). This way I mostly never have to force push as I only have to amend my local commit.
Force push is a bad practice as it can mess up everyone's work if you're working in a big team.
I would suggest to create two different
gamend
andgamendfp
so you force push only when you have to and you're absolutely sure that you're not gonna break someone else's work.Good suggestion.