Tag: git submodules

Dependency management in git repositories (using submodules)

I have a rather big project with lots of dependencies. The project is stored in a git repository and the dependencies are stored in dedicated git repositories linked as submodules. The dependencies can have further dependencies (again, using git submodules). This works well. However, if two dependencies required both a third dependency I run into […]

How to create a CocoaPod with nested git submodules?

I’m trying to create a CocoaPod with nested git submodules. I can create the pod, however, I can’t fully install it. When I run pod install –verbose I can see that git submodule update –init is being run instead of git submodule update –init –recursive which doesn’t pull the nested submodule. Does CocoaPods support nested […]

Git shallow submodules

Is it possible to have shallow submodules? I have a superproject with several submodules, each with a long history, so it gets unnecessarily big dragging all that history. All I have found is this unanswered thread. Should I just hack git-submodule to implement this?

git rm -r –cached not removing submodule folder and contents

Solution: remove –cached from git rm -r –cached submodule/name. Scripted for reference. I’m trying to remove a git submodule based on this SO answer, but the submodule is not being removed. I add the submodule, commit the changes, then delete it using git rm -r –cached $path/to/submodule (minus the trailing / ), commit the changes, […]

How is git bundle supposed to work with submodules ?

I am using git bundle to back up git repositories. In recent versions of git the repository metadata of a submodule are stored in .git/modules of the parent repository as opposed to before when it was stored in a .git directory right in the submodule. When git-bundle is run in a submodule, it creates a […]

Setting upstream to a submodule (or how to include a GitHub fork as a submodule)

I’m quite new to this Git thing and need a little help. I recently created a new repo on GitHub and cloned it on my desktop. Let’s call it myProject. I also have a fork in my GitHub account which I included in myProject as a submodule. Let’s call this myForkOfOtherProject, which is a fork […]

git submodules , gitslave, git subtree or a simpler solution

We have a git repository with N folders. Repo |-Folder1 |-Folder2 |- … |-FolderN With different collaborators we would like to share different folders. Each collaborator should have access only to his allowed subset of folders. What is the “good” way to achieve this using git? An answer was to use git submodules. But after […]

Checkout submodules in Jenkins with Github organisation plugin

I have a build job in Jenkins created by the Github Organization plugin. The Jenkinsfile for this build checkouts the code using checkout scm which is good as it figures out the correct branch/revision to checkout when building either PR triggered changes or pushes to the master branch. How can I make this: node { […]

Convert Git submodule to subtree

How can I convert a git submodule (with a folder in the local file system as a remote) to a git subtree, preferably preserving the commit history of the submodule?

Reuse Git submodule's submodule

I have a Git project. Let’s name that Proj. Proj has two submodules, Lib and Utils. Lib also has the submodule Utils. Now the problem is, when one wants to git clone –recursive Proj, he will need to download Utils twice. When the project grows deeper, the situation may be worse. So how can I […]

Git Baby is a git and github fan, let's start git clone.