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 <
If you want to go back to the HEAD
state for both the working directory and the index, then you should git reset --hard HEAD
, rather than to HEAD^
. (This may have been a typo, just like the single versus double dash for --hard
.)
As for your specific question as to why those files appear in the status as modified, it looks like perhaps you did a soft reset instead of a hard reset. This will cause the files that were changed in the HEAD
commit to appear as if they were staged, which is likely what you are seeing here.