Skip to main content

has_a_commit

Function has_a_commit 

Source
pub fn has_a_commit(repo: &Path) -> bool
Expand description

Whether this repository has a commit to branch from.

git worktree add <path> HEAD on a repository nobody has committed to fails with invalid reference: HEAD, which is the second half of the same problem is_repository catches the first half of: git init alone is not enough to run in.