diff options
Diffstat (limited to 't.py')
-rw-r--r-- | t.py | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -0,0 +1,9 @@ +from git import Repo + + +def get_active_branch(gitobj: Repo) -> str: + return gitobj.active_branch.name + + +gitobj = Repo(".") +print(get_active_branch(gitobj)) |