Skip to main content
added 1 character in body; edited title
Source Link
Nikita Fedyashev
  • 19.3k
  • 15
  • 58
  • 110

How do I add aGit submodule to a sub-directory?

I have a gitGit repo in ~/.janus/ with a bunch of submodules in it. I want to add a submodule in ~/.janus/snipmate-snippets/snippets/, but when I run git submodule add <[email protected]:...> in the snipmate-snippets directory, I get the following error message:

You need to run this command from the topleveltop level of the working tree. 

So the question is: How do I add a submodule to the snipmate-snippets directory?

How do I add a submodule to a sub-directory?

I have a git repo in ~/.janus/ with a bunch of submodules in it. I want to add a submodule in ~/.janus/snipmate-snippets/snippets/, but when I run git submodule add <[email protected]:...> in the snipmate-snippets directory, I get the following error message:

You need to run this command from the toplevel of the working tree. 

So the question is: How do I add a submodule to the snipmate-snippets directory?

How do I add Git submodule to a sub-directory?

I have a Git repo in ~/.janus/ with a bunch of submodules in it. I want to add a submodule in ~/.janus/snipmate-snippets/snippets/, but when I run git submodule add <[email protected]:...> in the snipmate-snippets directory, I get the following error message:

You need to run this command from the top level of the working tree. 

So the question is: How do I add a submodule to the snipmate-snippets directory?

Source Link
Robert Audi
  • 8.6k
  • 10
  • 47
  • 68

How do I add a submodule to a sub-directory?

I have a git repo in ~/.janus/ with a bunch of submodules in it. I want to add a submodule in ~/.janus/snipmate-snippets/snippets/, but when I run git submodule add <[email protected]:...> in the snipmate-snippets directory, I get the following error message:

You need to run this command from the toplevel of the working tree. 

So the question is: How do I add a submodule to the snipmate-snippets directory?