Git force sync branches

Forcing sync branches is not recommended!

  • Force the remote branch be the same as the local branch:
git push -f origin master
  • Force the local branch be the same as the remote branch:
git reset --hard origin/master

你可能感兴趣的:(Git force sync branches)