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 7659069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:17:02+00:00 2026-05-31T13:17:02+00:00

I am very new to git usage and finding it very confusing to understand

  • 0

I am very new to git usage and finding it very confusing to understand the branch/commit management. Anyway, the project I am working on is managed by git, and I am using gitk for it. Using gitk I was making commmits, and checked out a previous commit. And now when I do Visualize HEAD’s history, the commit that I checked out appears last and my other 5 or 6 commits after that have disappeared.

Please note that I was working on master branch – but for some reason I was not on master branch right Now. That is to say the gitk visualization was like this:

commit 14
.
.
.
commit 9
.
.
master
.
.
.
.
commit 1

I checked out commit 9 and I don’t have any commits hash codes either.

  • 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-05-31T13:17:02+00:00Added an answer on May 31, 2026 at 1:17 pm

    Use git log to see all your commits, get the SHA1 hash of the lastest one, then do

    git checkout -b "branchname" <SHA1 goes here>
    

    This will retrieve any commits you made when not on a checked out branch and you should then have all your commits visible on a new branch.

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

Sidebar

Related Questions

I still very new using Subversion. Is it possible to have a working copy
Say I am using git by creating a new branch for each feature, then
I made something very stupid. I made a commit using git commit (file edits
Using Emacs/Magit, I had first a very smooth git experience in another project, but
I'm very new to using Git, so many things escape me. Yesterday I tried
I'm new to Git. Before using Git, I used Subversion for my web project.
I am very new to git/versioning I create a git repository with netbeans, commit
I'm having a problem using Git. Bear in mind I'm very new to Git.
I'm using Git on a new project that has two parallel -- but currently
I am very new to Git and I have a slight problem. In SVN

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.