Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/CodeClash-ai/CodeClash
/ get_current_git_branch
Function
get_current_git_branch
codeclash/utils/git_utils.py:4–6 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
2
3
4
def
get_current_git_branch() -> str:
5
result = subprocess.run([
"git"
,
"rev-parse"
,
"--abbrev-ref"
,
"HEAD"
], capture_output=True, text=True, check=True)
6
return
result.stdout.strip()
7
8
9
def
is_git_repo_dirty() -> bool:
Callers
nothing calls this directly
Calls
1
run
Method · 0.45
Tested by
no test coverage detected