As usual, keep having to google this, so finally writing it down here…
git reset HEAD~ and make new commits as needed.
Commit further back
- Perform an interactive rebase (e.g.
git rebase -i main), and change the commit from
- Reset the commit with
git reset HEAD~.
- Make new commits as needed.
- Complete the rebase with
git rebase --continue