How do I reset my local branch to be just like the branch on the remote repository?
I did:
git reset --hard HEAD
But when I run a <
The question mixes two issues here:
git status
says nothing to commit, working directory clean.
The one-stop-answer is:
git fetch --prune
(optional) Updates the local snapshot of the remote repo. Further commands are local only.git reset --hard @{upstream}
Puts the local branch pointer to where the snapshot of the remote is, as well as set the index and the working directory to the files of that commit.git clean -d --force
Removes untracked files and directories which hinder git to say “working directory clean”.