Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git log rebases

I know that GIT rebases will rewrite the history -- i.e. the commit ids will change. However, Is there any way to trace when a branch was rebased and from which branch?

EDIT: I have a development branch 'A' and a topic branch 'B'. 'A' is shared by the team. At some point, 'A' has been re-based with a mainstream branch. As a result of the re-base (and subsequent commits), when I updated the topic branch, I saw discrepancies. I am trying to find out the correct person to talk to to resolve the issues.

like image 540
mustard Avatar asked Jan 23 '12 21:01

mustard


People also ask

How do I see my git log history?

On GitHub.com, you can access your project history by selecting the commit button from the code tab on your project. Locally, you can use git log . The git log command enables you to display a list of all of the commits on your current branch. By default, the git log command presents a lot of information all at once.

What is git log command?

The git log command displays all of the commits in a repository's history. By default, the command displays each commit's: Secure Hash Algorithm (SHA)

What does git log tell you?

The git log command shows a list of all the commits made to a repository. You can see the hash of each Git commit , the message associated with each commit, and more metadata. This command is useful for displaying the history of a repository.

Does git log show all branches?

Many times it's useful to know which branch or tag each commit is associated with. The --decorate flag makes git log display all of the references (e.g., branches, tags, etc) that point to each commit.


1 Answers

git reflog

will allow you to look at the history of all your git workflow. On a project I'm working on, here are the top three reflog entries:

151a1da HEAD@{0}: filter-branch: rewrite
db8c822 HEAD@{1}: checkout: moving from fixes to master
db8c822 HEAD@{2}: checkout: moving from master to fixes

The first column shows the SHAID. So you can use the standard git commands on this SHAID e.g. git show 151a1da

like image 119
idlethread Avatar answered Sep 18 '22 19:09

idlethread