isomorphic-git / isomorphic-git/isomorphic-git

Cannot create new branch when master is empty

Open
#766 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
8.4k
Forks
491
Avg merge
2h 53m
Merged PRs (30d)
7

Description

```js
await git.init({ dir: '/'});
await git.branch({ dir: '/', ref: 'new-branch' });
```
Error: `NoHeadCommitError: Failed to create branch "test" because the HEAD ref could not be resolved to a commit. NoHeadCommitError: Failed to create branch "test" because the HEAD ref could not be resolved to a commit.`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.