3,198 questions
4759
votes
43
answers
2.0m
views
How do I remove a submodule?
How do I remove a Git submodule?
Why can't I do
git submodule rm module_name?
2815
votes
23
answers
1.9m
views
How do I "git clone" a repo, including its submodules?
How do I clone a git repository so that it also clones its submodules?
Running git clone $REPO_URL merely creates empty submodule directories.
2797
votes
24
answers
2.3m
views
Pull latest changes for all git submodules
We're using git submodules to manage a couple of large projects that have dependencies on many other libraries we've developed. Each library is a separate repo brought into the dependent project as a ...
1199
votes
15
answers
1.2m
views
How can I specify a branch/tag when adding a Git submodule?
How does git submodule add -b work?
After adding a submodule with a specific branch, a new cloned repository (after git submodule update --init) will be at a specific commit, not the branch itself (...
1189
votes
17
answers
1.1m
views
Update Git submodule to latest commit on origin
I have a project with a Git submodule. It is from an ssh://... URL, and is on commit A. Commit B has been pushed to that URL, and I want the submodule to retrieve the commit, and change to it.
Now, ...
1021
votes
8
answers
529k
views
How to change the remote repository for a git submodule?
I've created a git repository with a submodule in it. I'm able to tell the submodule itself to change its remote repository path, but I'm not sure how to tell the parent repository how to change the ...
556
votes
12
answers
230k
views
How do I move an existing Git submodule within a Git repository?
I would like to change the directory name of a Git submodule in my Git superproject.
Lets suppose I have the following entry in my .gitmodules file:
[submodule ".emacs.d/vimpulse"]
path = .emacs.d/...
546
votes
30
answers
905k
views
How do I pull from a Git repository through an HTTP proxy?
Note: while the use-case described is about using submodules within a project, the same applies to a normal git clone of a repository over HTTP.
I have a project under Git control. I'd like to add a ...
506
votes
14
answers
160k
views
How to un-submodule a Git submodule?
What are the best practices for un-submoduling a Git submodule, bringing all the code back into the core repository?
491
votes
9
answers
500k
views
Update a submodule to the latest commit
I have a project A which is a library and it is used in a project B.
Both projects A and B have a separate repository on github BUT inside B we have a submodule of A.
I edited some classes on the ...
483
votes
17
answers
422k
views
How do I revert my changes to a git submodule?
I have a git submodule (RestKit) which I have added to my repo.
I accidentally changed some files in there and I'd like to go back to the source version. In order to do that, I tried to run
Mac:app-...
468
votes
5
answers
476k
views
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 ...
454
votes
7
answers
708k
views
Git update submodules recursively
My project struture
ProjectA
-FrameworkA (submodule)
--Twig (submodule of FrameworkA)
How I can update submodules recursively? I already tried some git commands (on ProjectA root)
git submodule ...
445
votes
7
answers
159k
views
Differences between git submodule and subtree
What are the conceptual differences between using git submodule and subtree?
What are the typical scenarios for each?
442
votes
20
answers
399k
views
No submodule mapping found in .gitmodule for a path that's not a submodule
I have a project that has a submodule at lib/three20
My .gitmodule file looks like this:
[submodule "lib/three20"]
path = lib/three20
url = git://github.com/facebook/three20.git
I have ...