summaryrefslogtreecommitdiff
path: root/t.py
blob: 560e420ea965f856d2ac25866a05c8088c10dc44 (plain)
1
2
3
4
5
6
7
8
9
from git import Repo


def get_active_branch(gitobj: Repo) -> str:
    return gitobj.active_branch.name


gitobj = Repo(".")
print(get_active_branch(gitobj))