Skip to content

Instantly share code, notes, and snippets.

View Brimizer's full-sized avatar

Daniel Brim Brimizer

  • Amazon.com
  • Seattle, WA
View GitHub Profile
@Brimizer
Brimizer / git_repo_info.py
Last active November 8, 2022 13:33 — forked from igniteflow/git_python_current_branch.py
GitPython get current active branch
"""
Depends on GitPython
pip install GitPython
"""
from git import Repo
def get_current_branch_name(repo_path)
"""
Gets the name of the active Git branch as a string.