I\'m learning about relative commit references and trying to understand the following git log --oneline --graph
output provided in a lesson.
In the
Commit can have more than one parent. ^ 1 means first parent. ^2 means second parent and do on. Just ^ defaults to ^1 which is first parent.
Similarly ~ give access to traverse up for an ancestor. For example if you want 3 generation up ~3. If you want 7th last commit in same branch favouring first parent while traversing.
Any merge will have two parents with merge to branch becoming first parent. Merge from branch becoming second parent.