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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:30:46+00:00 2026-05-23T11:30:46+00:00

My git log is showing something as: enter code here [git_trial]$ git log commit

  • 0

My git log is showing something as:

enter code here
[git_trial]$ git log
commit 4c5bc66ae50780cf8dcaf032da98422aea6e2cf7
Author: king <king@king.ap.com>
Date:   Thu Jun 30 15:09:55 2011 +0530


This is third commit

commit 8072be67ddd310bc200cab0dccb8bcb2ec4f922c

Author: king <king@king.ap.com>

Date:   Thu Jun 30 14:17:27 2011 +0530

This is the second commit

commit 3ba6ce43d500b12f64368b2c27f35211cf189b68

Author: king <king@king.ap.com>

Date:   Thu Jun 30 14:00:01 2011 +0530


This is the first git commit for file1

Question 1: Now, how do I check out only my first version?

Question 2: Also, when I do git log on only File1, why does it show only the first commit?

 [git_trial]$ git checkout 3ba6ce43d500b12f64368b2c27f35211cf189b68
 Note: moving to "3ba6ce43d500b12f64368b2c27f35211cf189b68" which isn't a local branch
 If you want to create a new branch from this checkout, you may do so
 (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new_branch_name>


  [git_trial]$ git log File1

  commit 3ba6ce43d500b12f64368b2c27f35211cf189b68

  Author: king <king@king.ap.com>
  Date:   Thu Jun 30 14:00:01 2011 +0530

  This is the first git commit for file1
  • 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-23T11:30:47+00:00Added an answer on May 23, 2026 at 11:30 am

    You can checkout a commit using git checkout sha-of-commit which you already have.

    But you cannot commit anything (as you’re not in a branch, you’re in a static commit).

    If you need to commit anything on top of that commit, you need to check it out into a branch using git checkout sha-of-commit -b testing-a-commit.

    git log <file> only shows commits that affect that file.

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

Sidebar

Related Questions

I really like the short git log format where I can see author, date
Other than parsing git log for the date string, is there a Git native
git diff --quiet returns exit code as documented. git log --quiet behaves exactly as
Why does git log --decorate not display more than one tag per commit? EDIT
I have made 2 git commit $ git log commit 9613e1e84b42aeef645977272d310250339cf0e0 commit 01f8699be310f9a56a40835b48a922a879bba24f Each
Is there a way to wrap git commit comments (when viewed via git log
Is it possible git log to be auto refreshed after commit or can I
I need to have format like: git log --decorate --graph --oneline --date-order but I
In my git log, I have 2 commits. How can I generate the difference
[root@234571-app2 git]# ./test.py File ./test.py, line 4 with open(/home/git/post-receive-email.log,'a') as log_file: ^ SyntaxError: invalid

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.