3,198 questions
0
votes
0
answers
59
views
Git submodule checkout overwrites .git/modules/<submodule>/config
I have an extremely weird issue with git.
I have never seen it before, none of my coworkers have seen it before, but it's reproducible on my PC
The setup:
we have a main repository, project
we use ...
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?
Best practices
0
votes
2
replies
18
views
What is the most maintenance free approach to importing assorted files into multiple repositories?
My team manages a few dozen repositories; Java, Angular, LDAP, and a number of other "types" of code. To smooth things out between these repos our devops guy wrote some shell scripts that ...
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 ...
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.
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, ...
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 (...
Best practices
1
vote
3
replies
92
views
How to update git submodule with latest commit automatically in remote
I have a project named sample which have 2 submodules sampleA and sampleB. I also have another git repo named Example which also refers to same submodule sampleA and sampleB. When I change something ...
0
votes
0
answers
53
views
Add multiple workspace roots for LSP-Server
We keep our library in a git submodule:
.
└── app
├── submodule_lib
│ └── test
└── test
submodule_lib is a standalone compilation target and has its own tests.
The problem arises when I ...
2
votes
1
answer
73
views
How do I re-use existing submodule checkouts when creating a worktree in Git?
I have a project where I have checked out the main branch, which has 2 submodules: vendor/foo and vendor/bar. If I create a worktree for a feature branch with git worktree add ../feature feature, this ...
1
vote
0
answers
162
views
How can I completely ignore git submodules (but keep them updated)?
I work in a large shared repo that has submodules that I never touch, but that I can't just git-ignore because sometimes they get changes that affect things I do touch. For instance, if I branch off ...
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-...
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 ...
384
votes
25
answers
440k
views
List submodules in a Git repository
I have a Git repository that has several submodules in it. How do I list the names of all the submodules after git submodule init has been run?
The git submodule foreach command could echo the names ...
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 ...