git - How to get commit where merged branch forked from -


o---1---o---o---o---o     master      \         /       o---o---2           feature 

is possible commit 1 without using reflog ? using git 2.4.2

i tried:

git merge-base master feature git merge-base feature master returns: commit 2  git merge-base --fork-point master feature git merge-base --fork-point feature master returns nothing ( exit code 1 ) 

not duplicates:

found answer subset question: ( backporting in fact usecase ! ) https://stackoverflow.com/a/16718891/867294

[alias]     oldest-ancestor = !bash -c 'diff -u <(git rev-list --first-parent "${1:-master}") <(git rev-list --first-parent "${2:-head}") | sed -ne \"s/^ //p\" | head -1' - 

i baffled not part of git default. @ least expect behavior of --fork-point option merge-base. if knows better/default alternative. please put in comments or separate answer !


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -