overwrite /commit history code example
Example 1: git amend
git commit --amend
Example 2: git command change to previous comit
git checkout <commit_id>
git checkout -b <new branch> <commit_id>
git checkout HEAD~X // x is the number of commits t go back