610 B
610 B
title, tags
| title | tags |
|---|---|
| Reset master to match remote | repository,branch,intermediate |
Resets the local master branch to match the one on the remote.
- Use
git fetch originto retrieve the latest updates from the remote. - Use
git checkout masterto switch to themasterbranch. - Use
git reset --hard origin/masterto reset the localmasterbranch to match the one on the remote.
git fetch origin
git checkout master
git reset --hard origin/master
git fetch origin
git checkout master
git reset --hard origin/master
# Local `master` branch is now up to date with remote `master`