Skip to content

Instantly share code, notes, and snippets.

@pmayur
Last active April 1, 2021 06:35
Show Gist options
  • Save pmayur/4bc6fc3e5a9223ea8c6fb05d28f3040e to your computer and use it in GitHub Desktop.
Save pmayur/4bc6fc3e5a9223ea8c6fb05d28f3040e to your computer and use it in GitHub Desktop.

GIT COMMANDS

$ git reset --hard HEAD

move to head

$ git reset --hard <branch-name>

move to branch

git reset --hard HEAD~n

where n is no of commits to move before head

source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment