Skip to content

Instantly share code, notes, and snippets.

@hrialan
Created November 18, 2022 08:23
Show Gist options
  • Save hrialan/d969516fb68830e67b48f92f420ae813 to your computer and use it in GitHub Desktop.
Save hrialan/d969516fb68830e67b48f92f420ae813 to your computer and use it in GitHub Desktop.
[Reset local branch] Reset local branch with the remote one. #git #github
git fetch origin
git reset --hard origin/main
git clean -df
git pull
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment