Skip to content

Instantly share code, notes, and snippets.

@AlexanderOnbysh
Last active January 1, 2018 15:18
Show Gist options
  • Save AlexanderOnbysh/58e546c03b6a54a41d5b3049060acff3 to your computer and use it in GitHub Desktop.
Save AlexanderOnbysh/58e546c03b6a54a41d5b3049060acff3 to your computer and use it in GitHub Desktop.
Correcting mistakes in previous commits
1) bash```git checkout <bad-commit>```
... make your changes ...
2) bash```git commit --amend -v```
3) bash```git rebase --onto HEAD <bad-commit> <checked-out-branch>```
\frac{n!}{k!(n-k)!}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment