Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rusllonrails/73e8231f0a9d01830b21 to your computer and use it in GitHub Desktop.
Save rusllonrails/73e8231f0a9d01830b21 to your computer and use it in GitHub Desktop.
GIT: How to pull from branch if someone force pushed to it and you already have local version
1)
git reset --hard origin/your_branch
2)
git branch -D your_branch
git fetch origin
git checkout -b your_branch origin/your_branch
git pull origin your_branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment