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

  • Home
  • SEARCH
  • 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 9166979
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:16:49+00:00 2026-06-17T15:16:49+00:00

Here is my git log: I want to reset the most recent commit (top).

  • 0

Here is my git log:

I want to reset the most recent commit (top).

If I run git reset --hard HEAD~1, however, it takes me back by five commits!

Similarly, if I run git rebase -i HEAD~3, I expect to see the most recent three commits appear, but instead I get about 50!

What could be going 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-17T15:16:50+00:00Added an answer on June 17, 2026 at 3:16 pm

    Your actual HEAD is merge, so it has multiple parents. If you write HEAD~1, git must choose from one of the parents. It just chooses the one you do not like.

    Use the actual hash instead HEAD~1 in such situations.

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

Sidebar

Related Questions

I'm using Git wrong. I want to use it right. Here's what I've got:
I want to format git-log match in a convenient way. The output of git-log
I want to take the output of a git log and use it as
i'm trying to write a 'live git log' bash script. here's the code so
My Rails app crashs in Heroku when I run heroku open in git. Here
Here's an example: >git status # On branch master nothing to commit (working directory
I'm getting a really annoying bug here: % git s<TAB> becomes % git sgit
I am using git along with git flow . Here git flow has a
It's possible that I'm not really understanding how git works here, but I have
Here is the man page for git show-ref -d . They also have an

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.