Simply:
1 2 |
git reset --hard origin/master |
Assuming that “origin/master” is your remote branch you want to reset to. This updates your local HEAD branch to be the same revision as origin/master, and --hard
will sync this change into the index and workspace as well.
ref – http://stackoverflow.com/questions/9210446/replace-local-branch-with-remote-branch-entirely