After doing
git reset --hard
I expected to see ‘HEAD is now at hexNumber’ and then ‘on branch master….nothing to commit. Instead I see
wb316-mac03:MoodTrack student$ git reset --hard
HEAD is now at ec11193 preparation for merge
wb316-mac03:MoodTrack student$
wb316-mac03:MoodTrack student$ git status
# On branch master
# Your branch and 'origin/master' have diverged,
# and have 2 and 9 different commits each, respectively.
#
nothing to commit (working directory clean)
I want to be completely overwritten by what’s in the remote master (without recloning). Did I do something wrong?
You should add the commit that you want to reset to:
git reset --hardwill just reset toHEAD(which was probablymasterin your case).