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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:54:58+00:00 2026-06-12T01:54:58+00:00

Possible Duplicate: Show the original branch for a commit I am trying to figure

  • 0

Possible Duplicate:
Show the original branch for a commit

I am trying to figure out what happened to a specific file in our Git repo. The file’s change history includes changes on several branches and some merges.

Unfortunately, the best output I can get from git log ... myfile.cs simply shows a graph of changes with not so much as a single branch name anywhere. It would be great if I could see which branch a given change was committed to.

It appears that this might be something that Git doesn’t track. If so, how else might I figure out which branch a change was committed to? If I’m mistaken, how do I persuade git log to show the branch names?

(for the record, --decorate doesn’t do it, presumably because this option only decorates the last change on each branch)

  • 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-12T01:55:00+00:00Added an answer on June 12, 2026 at 1:55 am

    Possible duplicate : Show the original branch for a commit


    Given the numerous operations that can happen to a commit (amend, merge, rebase, imported from origin…), I don’t think you can find exactly what you want.

    From other SO questions (see here or here), you can have the branches a commit belongs to :

    git branch --contains <commit>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Show the original branch for a commit git version 1.7.4.1 I have
Possible Duplicate: Show just the current branch in Git I am moving my monotone
Possible Duplicate: Uploadify: show error message from HTTP response I am trying to get
Possible Duplicate: Show ignored files in git I have forgotten how I setup my
Possible Duplicate: Show and hide divs at a specific time interval using jQuery I
Possible Duplicate: git: show all changed files between two commits How can I get
Possible Duplicate: how do I get git to show me which branches are tracking
Possible Duplicate: Hide/Show Navigation & Tool Bar on tap This is the void I'm
Possible Duplicate: Programatically show tooltip in winforms application When set a TooltipText on a
Possible Duplicate: Tasks should show up only if the user has been assigned it

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.