How to get the parents of a merge commit in git?

前端 未结 2 1879
[愿得一人]
[愿得一人] 2020-11-30 19:46

Some git commands take the parent as a revision; others (such as git revert), as a parent number. How to get the parents for both cases. I don’t want to use the

2条回答
  •  旧巷少年郎
    2020-11-30 20:05

    The following is the simplest way I've found to view the parents of a merge

    git show --pretty=raw 3706454
    

提交回复
热议问题