-1

What is a quick way to find the initial creation of a branch in git?

I want to run it with a diff on HEAD

ericleit
  • 311
  • 3
  • 11
  • 1
    See also [Branch length: where does a branch start in Git?](http://stackoverflow.com/questions/17581026/branch-length-where-does-a-branch-start-in-git). Git does not preserve when branches were created. All branches start at the initial root commit. –  Aug 05 '13 at 20:29
  • Possible dupes: [Find the parent branch of a branch](http://stackoverflow.com/questions/3161204/find-the-parent-branch-of-a-branch) and also [Finding what branch a commit came from](http://stackoverflow.com/questions/2706797/finding-what-branch-a-commit-came-from) – willoller Aug 05 '13 at 20:32
  • 1
    Original poster: you might want to edit your question to be more specific about what you're trying to find. –  Aug 05 '13 at 20:38

1 Answers1

1

What git is really tracking is the point of divergence between the sources, so you will not necessarily, have the actual creation point of the branch available. Lots of things like merges, rebases, cherry-picks, etc will lose it.

So, unfortunately, there is no easy solution. I recommend using a GUI to examine the tree (I like GitX-dev on the mac)

willoller
  • 7,106
  • 1
  • 35
  • 63