less than 1 minute read

In order to reset a branch to the remote/origin version:

Main

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

Other branch

git checkout (branch)
git fetch origin
git reset --hard origin/(branch)

Tags:

Categories:

Updated: