Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8729653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:52:11+00:00 2026-06-13T08:52:11+00:00

After doing git reset –hard I expected to see ‘HEAD is now at hexNumber’

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T08:52:12+00:00Added an answer on June 13, 2026 at 8:52 am

    You should add the commit that you want to reset to:

    $ git reset --hard origin/master
    

    git reset --hard will just reset to HEAD (which was probably master in your case).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to inspect any code changes after doing a git pull .
After doing a simple merge (one without conflicts), git show usually only shows something
The goal is so after doing git clone git@somewhere:something.git The resulting something/.git/config will contain
I was messing about with reset after reading stuff in the Pro Git book.
After doing the git cvsimport my previous commits are listed belonging to user user
After rebasing and doing a git push -f , the size of the repository
After doing git svn init -s <url to repo> , git remote doesn't list
Apparently XCode should recognize a git repo automatically, but after doing git init and
After doing a set , when i try to get a object from memcached,
After doing the following test: for( i = 0; i < 3000000; i++ )

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.