DEV Community


Discussion on: Is git commit --amend truly *important*?

jmau111 profile image
Julien Maury

You should rewrite the history on your local machine with a rebase -i. It allows for cleaning history before pushing anything.

Indeed, you have this push -f technique but unless you are alone in your branch it's pretty unsafe. Once it's pushed, it's hard ^^.

The key feature in git is the graph.

BUT, in the same time, you have the "squash and merge" feature on Github so those commits won't appear on the main branch after merge ;)

Forem Open with the Forem app