DEV Community

Discussion on: One Command to Change the Last Git Commit Message

Collapse
 
flexdinesh profile image
Dinesh Pandiyan • Edited

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.

Collapse
 
ahmadawais profile image
Ahmad Awais ⚡️

Good suggestion.