Skip to content

Home

Reset master to match remote

Resets the local master branch to match the one on the remote.

git fetch origin
git checkout master
git reset --hard origin/master

# Examples
git fetch origin
git checkout master
git reset --hard origin/master
# Local `master` branch is now up to date with remote `master`

More like this

Start typing a keyphrase to see matching snippets.