git amend old commit code example
Example 1: amend last commit message
$ git commit --amend -m "New and correct message"
Example 2: git amend last commit message
$ git commit --amend -m "New and correct message"
Example 3: add changes to last commit
git add the_left_out_file
git commit --amend --no-edit
Example 4: git amend
git commit --amend
Example 5: add change to last commit
$ (some_branch) git commit --amend
Example 6: git revert to old commit
git reset --hard c14809fa