Skip to content
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

fatal: ambiguous argument 'HEAD' #1

Open
northern opened this issue Sep 11, 2014 · 3 comments
Open

fatal: ambiguous argument 'HEAD' #1

northern opened this issue Sep 11, 2014 · 3 comments

Comments

@northern
Copy link

Hi there.

Just following the instructions on the main page of this project, step by step. After I do:

git subtree add --prefix=vm symfony-vm master

I get the following:

fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Working tree has modifications.  Cannot add.

Not sure how to resolve this.

@bezhermoso
Copy link
Owner

Hi @northern!

Can you try doing git fetch symfony-vm master first before the git subtree command?

@bezhermoso
Copy link
Owner

Ok, I know what's causing this:

You have to have a clean tree before being able to subtree stuff. After git init, you have to first add and commit everything and so you have a clean working directory.

After that you should be able to do git subtree add ... with no problem :)

Let me know if you encounter any problems.

@dhirajunraveldata
Copy link

I am still have the same issue even after starting with clean directory. Is there any resolution for the problem ?

fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'
Working tree has modifications. Cannot add.

My git version is : git version 1.9.5 (Apple Git-50.3)

I found a fix.
if I add a dummy file and commit it than there is no error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants