I usually submit a list of commits for review. If I have the following commits:
HEAD
Commit3
Commit2
Commit1
...I know that I can modify head commit with git commit --amend
. But how can I modify Commit1
, given that it is not the HEAD
commit?
For me it was for removing some credentials from a repo. I tried rebasing and ran into a ton of seemingly unrelated conflicts along the way when trying to rebase --continue. Don't bother attempting to rebase yourself, use the tool called BFG (brew install bfg) on mac.