# git subtree add fails in new repository

1 messages from 2017-02-10 to 2017-02-10. Participants: Daurnimator.
Thread: https://gitlist.dev/t/45097

## Daurnimator, 2017-02-10 06:03

Subject: git subtree add fails in new repository
Message-ID: <CAEnbY+fcGjaTCC5ZMUzgvz-44ii1A2a7JXJJTAib255fsNWpWA@mail.gmail.com>
URL: https://gitlist.dev/e/CAEnbY%2BfcGjaTCC5ZMUzgvz-44ii1A2a7JXJJTAib255fsNWpWA%40mail.gmail.com

```
I'm trying to make a series of repository that only contain subtrees
for various other projects.
However git subtree does not like being on a newly created branch:

$ git init
$ git subtree add --prefix=git https://github.com/git/git.git master
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.

```
