What’s the correct way to check if it’s possible to perform a fast-forward merge with git merge-base?

git merge-base --is-ancestor <commit> <commit>

--is-ancestor Checks if the first <commit> is an ancestor of the second <commit>, and exit with status 0 if true, or with status 1 if not. Errors are signaled by a non-zero status that is not 1.

e.g.

 git merge-base --is-ancestor origin/master master

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)