To get Parent Commit
git cat-file -p commit_id
tree tree_id
parent parent_commit_id
[parent other_parent_commit_id] # present only in case of merge commits
author xxx <xxx@email.com> 1513768542 +0530
committer xxx <xxx@email.com> 1513768542 +0530
I have commit number. I would like to get previous commit number(parent). I need commits from current branch.
回答
To get Parent Commit
git cat-file -p commit_id
tree tree_id
parent parent_commit_id
[parent other_parent_commit_id] # present only in case of merge commits
author xxx <xxx@email.com> 1513768542 +0530
committer xxx <xxx@email.com> 1513768542 +0530
© 著作权归作者所有
发表评论