3,198 questions
35
votes
3
answers
13k
views
Is there a way to `git submodule add` a repo *without* cloning it?
I have a very long list of repos that I'm trying to make into one parent repo by making them all submodules.
I've tried adding them to .gitmodules manually, and also to .git/config, but it doesn't ...
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 ...
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 ...
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 ...
2
votes
3
answers
3k
views
Any way to auto-update/push git submodule (without a cmd to do so)
What's the easiest way to auto-update a git submodule, without having to manually pull it and commit/push the owning repo update?
I'm using Azure DevOps with yaml. I'm trying to find the best way ...
248
votes
8
answers
131k
views
Rename a git submodule directory
Is there some easy way to rename a git submodule directory (other than going through the entire motion of deleting it and re-adding it with a new destination name).
And while we are at it, why is ...
8
votes
5
answers
10k
views
Checkout Submodules in another Project in Azure DevOps Repository
I'm trying to checkout a submodule from another project in azure devops.
steps:
- checkout: self
submodules: true
persistCredentials: true
clean: true
Checking out another repository in the ...
8
votes
5
answers
9k
views
How do I enable my Azure pipeline to checkout a submodule using Git?
In our Git project, we have the following defined in .gitmodules
[submodule "DBPkg"]
path = DBPkg
url = https://[email protected]/MainCo/OurProject/_git/DBPkg
When building the Azure ...
22
votes
6
answers
27k
views
Can't resolve merge conflict with git submodule folder
I have two git branches, develop and redesign that I need to merge. I have a submodule called library where its updates are being tracked by develop. When I run 'git merge' it says library has been ...
6
votes
3
answers
10k
views
Why would 'git submodule update' skip a submodule?
I have a git repo with a single submodule sub/x. (This submodule does not contain any submodules of its own.)
In the superproject's repo, the output of git status shows the following (unstaged) ...
11
votes
2
answers
3k
views
What's the Git command to determine which commit changed a submodule pointer?
I'm dissecting a series of changes made to a git repo, some of which involved a submodule. I used git blame to find the relevant commit within the submodule, but is there a simple way to locate which ...
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 ...
1
vote
1
answer
427
views
What's wrong with nested git repos?
I am in a situation where I cannot use submodules (or subtrees, I believe), and I can only use vanilla nested repos (the reason is somewhat unusual, but it has to do with building inside a docker ...
44
votes
3
answers
42k
views
`--name` option doesn't work with `git submodule add` command
I want to add a git submodule with different name like:
git submodule add --name foo [email protected]:ironsand/cookbook-foo.git
I wanted to create a git submodule directory named foo, but the ...
11
votes
1
answer
10k
views
git init in a git subdirectory
I have a git repo which has some subdirectories:
~/src
~/src/.git
~/src/mystuff
~/src/otherstuff
Now I want to share src/otherstuff with someone else. They should be able to clone it and push changes ...