DEV Community 👩‍💻👨‍💻

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

jwkicklighter profile image
Jordan Kicklighter

In the example you provided, it depends on how valuable it is to know the incorrect solutions.

If the answer is "it's very important, as I'm likely to do them again," then absolutely leave them. That is valuable history for anyone working on the project later.

If the answer is "they were silly typos, just took CI to find them for me" then I'd say they should be cleaned up. That way your git blame will be a very clear picture of what changed, rather than cluttered with a useless previous revision. This is incredibly helpful when using git blame in your tooling to show the commit that last changed a file/line.