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.
You can probably tell who did it! When you rebase, since the commits are rewritten, the committer information will be from the person doing the rebase, not the original author. (This is separate from the author information.)
You can see this information in
gitk
(in the diff pane in the lower left) or in the output ofgit log --pretty=fuller
(as in more full than full). Example log output:The committer name, email, and date are from the operation that actually wrote the commit. Note that if it's been rewritten multiple times, you'll only have the most recent information.
As for where it was rebased from... if the original version of the rebased commits are also in your history, that's easy. Just search the full history for a matching commit, for example by a fragment of the commit message, or by something that was changed in the commit:
If you don't have the original commit anywhere in history anymore, that's going to be tougher. Hopefully you'll be able to find out by tracking down the person who did it, and if they don't know, asking them to run
git reflog show <branch>
in their repository, to see the history of that branch.