git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git subtree add fails in new repository

From
DDaurnimator <quae@daurnimator.com>
Date
Feb 10, 2017, 06:03 UTC
Message-ID
<CAEnbY+fcGjaTCC5ZMUzgvz-44ii1A2a7JXJJTAib255fsNWpWA@mail.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.

Message 1 of 1 in “git subtree add fails in new repository”
  1. DaurnimatorFeb 10, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.