Adapted from answers by Dan Moulding and knittl
Setting your branch to exactly match a remote branch, including clearing untracked files, can be done in three steps:
git fetch origin
git reset --hard origin/<branch name>
git clean -f -d
Explanation: git fetch
grabs the latest version of the repository. git
β¦
Top comments (0)