Run the command:
git rebase -i @~5
This displays the last 5 commits.
Then:
- Find the commit you want to edit
- Replace
pick
withe
- Save
Edit, save, and add the require files, and then run:
git commit --amend
After saving, run:
git rebase --continue
git reset @~5
git reflog
git reset <commit>