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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:31:51+00:00 2026-06-09T23:31:51+00:00

For example, in a git worktree of Linux Kernel. $ git checkout v2.6.6 $

  • 0

For example, in a git worktree of Linux Kernel.

$ git checkout v2.6.6
$ git checkout v3.3

How to find the last head name or HASHID in current branch v3.3? In the example above, it should get v2.6.6 or the HASHID for v2.6.6.

Thanks.

  • 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-09T23:31:52+00:00Added an answer on June 9, 2026 at 11:31 pm

    Every time you move the head git records it in the reflog.

    $ git reflog
    

    If you were to run this command after the commands in your question, the old commit hash would be on the second line down and will reference the tag you were moving to.

    For example

    ff06760 HEAD@{0}: checkout: moving from 9b49c22462f5dd73ff18eacff5983f141f98cb82 to v3.3
    9b49c22 HEAD@{1}: checkout: moving from ff06760cd0db8cef49915e68886c66c09b1cade1 to v2.6.6
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I set up a post-recieve hook in git like #!/bin/sh GIT_WORK_TREE=/var/www/www.example.org git checkout
When I checkout, I get: me@localhost# git checkout master D deps/example M deps/example2 Switched
What will be proper regular expression for git repositories? example link: git@github.com:someone/someproject.git so it
When you run git clone , it updates progress in place. For example, the
For example, I'd like to do the following... $ git tag -a v1.0 [-d
I need to migrate part of an SVN repo to git. For example, the
What exactly are these commands doing: ssh serveradmin%mt-example.com@serveradmin@mt-example.com cd domains/git.mt-example.com/html/mt-example.git git --bare update-server-info cd
Currently my terminal prompt includes git information. Example clean directory: michaelespinosa:~/Sites/example.com [git:master] Example dirty
Can someone show/point/help me to a resource for distributed development Git example or guide?
After cloning a git repository, How can I get the repository file? for example)

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.