rationale behind git not tracking history of branches
- From
- Kevin Buchs <kevin.buchs@newcontext.com>
- Date
- May 26, 2020, 21:01 UTC
- Message-ID
- <CAKTRx=09tjsH0j+Nf4_1uzn-GwasWFB_Q96KEO=qtr5nVBkAew@mail.gmail.com>
For many years of using Git, I always struggled to make sense of commit history graphs (git log --graph; gitk). Just recently I discovered that git does not track the history of branches to which commits belonged and the lightbulb turned on. This is proving to be painful in a project I inherited with permanent multiple branches. Now, I am a bit curious as to the rationale behind this intentional decision not to track branch history. Is it entirely a matter of keeping branches lightweight?
I am assuming one can backfill for the missing capability by using a commit hook to manually track when a branch head is changed. Perhaps by storing the branch in the commit notes.
Kevin Buchs, Senior Engineer, New Context Services kevin.buchs@newcontext.com 507-251-7463 St. Cloud, MN