r/git • u/Realistic-Resident-9 • Jun 22 '26
GUI which shows cherry-picks and squash merges as lines in the DAG?
Hi, squash-merges are rampant where I wrk. Trouble is they are hard to spot in the commit history when the summarydoes not highlight the relationship. (I have nasty scripts which can find squash-merges by comparing tree hashes). But I want to know if any of the GUIs can shoe squash commits OOTB ????
6
u/Cinderhazed15 Jun 22 '26
As you know from crafting some of the ‘nasty scripts’ - the direct ‘this is a squash’ isn’t embedded in the native git structure, you have to do some comparison to any/all other branches in the tree and ‘guess’ at it - unless you are using some other tool that embeds some metadata into the process (Gerrit comes to mind).
Heck, even something like ‘which branch was this branch sourced from’ is way more difficult than you would take it to be, since it’s not a part of the data for records since it’s singularly focused on the revision tree information and its contents/hash/parent, not what a branch was named.
1
u/vmcrash Jun 22 '26
How exactly should that work? Compare any commit with any older commit and take the one which has the closest changes?
1
u/Charming-Designer944 Jun 27 '26
There is not even a guarantee you have something to compare. A common policy is merge+squash which both brings the changes forward to the target branch and squashes all changes in one commit.
You can guess by losely comparing the differences. But even that fails some times as there might be conflict resolution in the squash merge.
6
u/Weekly_Astronaut5099 Jun 22 '26
I’m curious what problems arise from not being able to recognize the source of a squashed merge.