Skip to content

Instantly share code, notes, and snippets.

@sheff3rd
Last active September 17, 2018 12:51
Show Gist options
  • Save sheff3rd/a4b356c8ff60b0a64f64c65d1ef0d80e to your computer and use it in GitHub Desktop.
Save sheff3rd/a4b356c8ff60b0a64f64c65d1ef0d80e to your computer and use it in GitHub Desktop.
// Reset all local commits
git reset --hard @{u}
// Delete untracked files and directories
git clean -f -d
// reset all unpushed commits, keep the work
git reset --soft
// reset all unpushed commits, destroy the work
git reset --hard
// make local origin same as master
git fetch origin
git reset --hard origin/master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment