【发布时间】:2014-11-25 20:39:00
【问题描述】:
这个问题应该与:
- How to get the current branch name in Git?
- Get git current branch/tag name
- How to get the name of the current git branch into a variable in a shell script?
- How to programmatically determine the current checked out Git branch
但我想知道如何通过pygit2 做到这一点?
【问题讨论】:
-
pygit2.org/references.html#the-head -
repo.head没有做你想做的事? -
您介意将其发布为答案吗?我相信这也可以帮助其他人:)