Tag: git submodules

Finding submodule commits that never got pushed to a public repository

Can someone help me fill in the missing pieces to a script I’m trying to write? I just realized that I have a public repository that contains references to commits in a submodule that I never pushed to origin (the commits were reorganized before pushing). I don’t know how many times it’s happened, but I’d […]

locally committing to git submodule

I have a git project that contains a git submodule that I cloned from a public read-only repository (i.e. I cannot push to that repository). Is it possible to commit to that submodule? Here’s how I tried to do this [main]$ cd sub [sub]$ git checkout master [sub]$ echo test > new-file [sub]$ git add […]

Organizing External Libs in Git for Several Projects

The Problem I want my company to store all the included external libs in source control, but I would like these external libs to be in a single repo (not included in each individual project) as there’s quite a few libs, and they are large. Prior Art This question addresses the problem but no one […]

Working with Git submodules without .gitmodules

I’m interested in the specific case where you manually place one Git repository inside another Git repository (either by using git clone or by copy-pasting in the filesystem). I’ve noticed the following things happen when you do this: Git will save a pointer to a specific commit, like with a submodule. Git will not allow […]

using git filter-branch for submodule checkout

I have a git repo with one submodule. I used the method described here to connect them. Now, I’d like to use filter-branch to check out a specific revision from the submodule for each revision of the superproject. I wrote a script that does that, but checkout doesn’t work, because in the temporary root, the […]

Extracting git history for part of a git repo to create a git submodule — cherry-pick?

A similar question, How to cherry-pick multiple commits, assumes that the commits are consecutive. I have a module that I downloaded as a tarball. I’ve included it in my main project’s git repo and made changes to it. These changes are interspersed with other commits for the main project. I’ve realized the error of my […]

How can I use one commit for git main and sub modules?

Let’s say I have a project(UI) which has a git submodule(Data layer). I’ll often change both the submodule and the main git repo. Is it possible to modify files in both and commit them together?

How can I get git clone –recursive A B to use the the submodule repositories in A?

It seems that if project A has submodules with remote urls, then git clone –recursive A B insists on pulling down copies of each submodule repository from the remote url. Is there a way to get git to clone the submodule repositories from the copies in A instead of pulling from the remote repositories? I […]

How to track separate projects with same core files in git

I use git version controll and I have multiple projects that uses same base directory, although some changes are made project specific. Is there a way I could track with same git repo the superfolder (root/private/core in my case) and both public and private project specific directories aswell. Also, if I make changes in one […]

Can git submodules reference HEAD instead of a specific commit (useful for a superset project)?

We have a bunch of git repositories: drools jbpm guvnor planner … (many more) which are a git submodules in a super git repository, which is an aggregation of all these repositories, so the whole thing can be cloned at once and configured in our IDE at once. However casual developers can also only clone […]

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