Skip to content

Instantly share code, notes, and snippets.

@takiguri
Created July 9, 2018 19:25
Show Gist options
  • Save takiguri/8f3a4bc859c9a4adf76370666791cc9d to your computer and use it in GitHub Desktop.
Save takiguri/8f3a4bc859c9a4adf76370666791cc9d to your computer and use it in GitHub Desktop.
Amending non-head commits
sh: git rebase 'commit-hash-to-amend^'
text editor: replace 'pick' to 'edit' on the target commit hash.
text editor: save and quit
code: Apply all changes to amend.
sh: git commit --all --amend --no-edit
sh: git rebase --continue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment