Ask a question to get started
Enter to send•Shift+Enter new line
read_git_commit_sha_from_filesystem( path: str | Path, ) -> str | None
path
str | Path
Directory or file path inside a repository.
Read the current HEAD commit SHA from repository metadata.
HEAD
Resolves a symbolic HEAD (ref: refs/heads/<branch>) by reading the loose ref file, then packed-refs. A detached HEAD already contains the raw SHA.
ref: refs/heads/<branch>
packed-refs