Skip to content

Instantly share code, notes, and snippets.

@iamdylanngo
Last active August 8, 2020 08:48
Show Gist options
  • Save iamdylanngo/e17fb0565c4892f678bdd7375a0a8cc8 to your computer and use it in GitHub Desktop.
Save iamdylanngo/e17fb0565c4892f678bdd7375a0a8cc8 to your computer and use it in GitHub Desktop.
change-history-commit
git log
git reset --soft HEAD~N
Change code, add everything and commit code
git add <file>
git commit -m "new commit"
git push orign <branch> -f
N: number commit you want to reset
# Example: You want to reset 3 commit
get reset --soft HEAD~3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment