New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lerna publish:Error: Command failed: git rev-parse --abbrev-ref HEAD fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree. #763
Comments
Please use the issue template: https://raw.githubusercontent.com/lerna/lerna/master/.github/ISSUE_TEMPLATE.md In this case, |
bogon:lerandemo qiupengchao$ git --version |
Same issue here. Fails with:
Im using |
OS: Ubuntu 16.04 LTS
|
@devmao |
@otbe same issue with a path, relative or absolute. |
Same issue here with lerna import. Unable to work around it. git version 2.11.0 (Apple Git-81) |
Okay looks like I found a fix for this. Commit all changes in your monorepo and have a clean tree before attempting to import another package and it's git history. I suppose it makes sense :) |
I could have sworn we already throw an error when the local tree had uncommitted changes. In any case, thank you for investigating!
… On May 16, 2017, at 01:49, Iyobo Eki ***@***.***> wrote:
Okay looks like I found a fix for this.
This issue only comes up when I try to lerna import into a lerna repo with uncommited changes.
Commit all changes in your monorepo and have a clean tree before attempting to import another package and it's git history. I suppose it makes sense :)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@iyobo yes, it's the solution for me too. |
Lerna throws a Git error when current project has uncommitted changes. fixes: lerna#763
Lerna throws a Git error when current project has uncommitted changes. Fixes #763 [ci skip]
fyi... you'll also get this error when trying to I wouldn't consider this a bug, as it's only likely to be encountered while testing |
This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
bogon:lerandemo qiupengchao$ lerna publish
Lerna v2.0.0-rc.1
Current version: 1.1.1
Checking for updated packages...
No tags found! Comparing with initial commit.
? Select a new version (currently 1.1.1) Minor (1.2.0)
Changes:
? Are you sure you want to publish the above changes? Yes
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'
GitUtilities.getCurrentBranch ({"cwd":"."})
Error: Command failed: git rev-parse --abbrev-ref HEAD
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'
GitUtilities.isDetachedHead ({"cwd":"."})
Error: Command failed: git rev-parse --abbrev-ref HEAD
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'
Errored while running PublishCommand.execute
Error: Command failed: git rev-parse --abbrev-ref HEAD
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'
The text was updated successfully, but these errors were encountered: