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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:04:50+00:00 2026-05-12T11:04:50+00:00

A commit isn’t necessarily in a branch, so how do you see and manage

  • 0

A commit isn’t necessarily in a branch, so how do you see and manage these commits? Also, is it possible to look at these commits from gitk?

Thanks a lot!

PS: just to make things clearer, here is an example:

git init
git commit
touch toto
git add toto
git commit -a
echo $RANDOM > toto
git commit -a
git checkout f798e54 #checkout initial commit
echo $RANDOM > toto
git commit -a #"untracked commit"
gitk --all
git branch
git log
git checkout master #back on the main branch
gitk --all #untracked commit is lost?
git log
git branch

How can I get my “untracked commit” back?

  • 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-12T11:04:51+00:00Added an answer on May 12, 2026 at 11:04 am

    This situation is called a detached HEAD. Normally tools (such as gitk) won’t show you commits that aren’t reachable by a symbolic branch name.

    To get your commit back, you can use git reflog to show a log of all recent activity, including your detached HEAD. When you find it, you can use its commit ID with git checkout to get back to it. If you find that it’s valuable, you may want to give the branch a name at that point.

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

Sidebar

Related Questions

I want to automatically commit the database when we copy files from one branch
It seems a git repo inside a parent repo isn't included in a commit
When I commit I get this error from Subversion: bash-2.05b$ svn commit -m testing
A Phusion Passenger error message isn't what I want my visitors to see if
Does Git support any commands that would allow me to commit directly from a
Im having problem incrementing a sharedpreference. Isn't it possible? .. SharedPreferences getPrefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext());
Here's the situation. I'm working on the master branch. I create file1 and commit.
I am using the latest jstree commit from github with the checkbox plugin as
I do have a problem with my commit history. Well, it isn't actually a
I have a Perl program, intended to be run from a subversion post-commit script,

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.