4 ms·
Git has the concept and knowledge of which side a merge came from. A commit having multiple parents (a merge commit) maintains the order of those parents withi
by Too 5y ago
Git has the concept and knowledge of which side a merge came from.
A commit having multiple parents (a merge commit) maintains the order of those parents within the commit. The branch names are famously lost, but by convention you can say that the first parent should always be the main branch.
As with all other git things, the ux for this feature isn’t the best and it’s use varies wildly across tools and organizations.
To view the main branch log only you have to pass arcane -—left-only flags into git log.
Some people don’t know the difference of merging from branch to main vs the other way around, end result looks the same right. One such mistake messes up the history.
- em-bee 5y agothat's the problem with git. it is powerful, but some things are just not practical. if i have to be careful how i merge then that's not user friendly. on the other hand, adding a field that stores the name of the branch at commit time would be almost trivial programmatically. and it would enable a much more user friendly interface.