Skip to main content

Section 6.1 Git Cheat Sheet

Note ID: 202604120002 | Tags: <git>

Note 6.1.1. Reset local repo to match remote repo.

git fetch origin
git checkout main        # or whatever branch you're using
git reset --hard origin/main
git clean -fd            # removes untracked files & folders