Tag: git submodules

Adding git submodule that contains another submodule?

I’m working on a project in one git repository (A) that is including another git repository (B), which in turn includes a third git repository (C). In A, I added B via: git submodule add https://github.com/blt04/sfDoctrine2Plugin.git plugins/sfDoctrine2Plugin Click here, and you can see where B references C: https://github.com/doctrine/doctrine2 After doing my git submodule add, my […]

git submodule not pulling files in submodules

I thought I had it all worked out with this new project and thought that git submodules are the way to to develop and deploy my application. Set up my git repo (Drupal) and initialized it with the 7.12 tag of Drupal. Made my own branch. Then added the modules that are needed under sites/all/modules/contrib […]

Moving git submodule to another directory within the same repository

Initially I had the following (simplified) repo structure: MyRepo external1/MySub (git submodule) .gitsubmodules Where $ cat .gitsubmodules [submodule “external1/MySub”] path = external1/MySub url = user@repo:/remoterepo/externals/MySub.git I then wanted to move MySubmodule to another directory in the same git repository, e.g., external2 so the structure is as follows: MyRepo external2/MySub (git submodule) .gitsubmodules What I did, […]

Swap git submodule with own fork

I added a submodule to my git repo like this: $ git submodule add git://github.com/user/some-library some-library I’ve decided I want to create a fork of that library to do some adjustments. How can i swap that submodule so that it points to my own github fork instead?

git submodule sync command – what is it for?

I don’t understand from the documentation what does git submodule sync do. Please explain.

When to break up a large Git repository into smaller ones?

I am working on doing a migration from SVN to Git. I have already used git-svn to get the history into a single git repository, and I already know how to use git-subtree to split that repository into smaller ones. This question is not about how to do the migration, it is about when to […]

git submodule update with other user

I’m logged in as user A on my machine, but my repo is accessible through username B on the server that I pull from. The .gitmodules file has url = ssh://domain.com/abc/def.git. How can I configure git to use a username B instead of A when I do git submodule update?

Git submodules vs Nuget packages

Our team has experimented with git submodules for some core CRUD functionality shared by most of our products. We have also successfully used Nuget packages (self-hosted now) for some common utilities. Our core functionality changes often enough that keeping submodules properly committed is proving to be more of a chore that we expected. I am […]

What are the pros and cons of git submodule and Repo?

It just so happens that we share a library between 3 different mobile platforms. There is much debate within the office on what is the best tool to use to manage this library. Repo (Android) from what I read is a tool built on top of git used for managing the hundreds of git repositories […]

How can I add a specific folder from a git repo as a git submodule?

I have a git repo and I want to add a submodule to it. Problem is, the submodule exists as a folder inside another repo. Can I add only that folder as a submodule?

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