Home > Mobile >  Is there a way to tell if a GIT commit is a merge?
Is there a way to tell if a GIT commit is a merge?

Time:11-18

Is it possible to determine whether a commit (or md5hash value) is a "merge" from a developer branch to a parent branch? (i.e. master)

Thanks in advance.

CodePudding user response:

Sure, just check how many parents it has:

git show --pretty=%ph --quiet some-brach-or-commit

If more than one parent shows up, it's a merge commit.

CodePudding user response:

You can use ether UI or git log on master that will show you a list of all the commits made to a repository and search for your commit

  • Related