git-submodules

Why are git submodules incompatible with svn externals?

There are lots of webpages out there suggesting hackish ways to make svn externals look like git submodules. I have read some accounts of what the difference is, but this doesn't seem very fundamental: Git submodules link to a particular commit in another project's repository, while svn:externals always fetch the latest revision. W...

Will deleting a branch in a git submodule's repository make commits in that branch unavailable to the superproject?

I'm fairly new to git, and I suspect the answer to this is no, but wanted to check with some of the more experienced git users here. I have a superproject which has a commit which includes a reference to a development branch of a submodule. I'm a little worried that when I rebase that development branch onto master and delete it that t...

How do I pull a git submodule from separate project?

Let's keep things simple shall we? I have a git project set up. Let's call it ProjectA. My friend has another, older git project set up, called ProjectB. In ProjectB, he has two submodules, SubOne and SubTwo, set up. Now, when I mean "set up", I mean he can just "git submodule update" them. They exist. Now, being selfish, I want to ste...

Git: can I suppress listing of 'modified content'/dirty submodule entries in status, diff, etc?

Somewhen (around the 1.6.x releases, I think) git became aware of changes inside submodules. That only serves to annoy me: $ git status vendor | grep modified: # modified: vendor/rails (modified content) $ git diff vendor/ diff --git a/vendor/rails b/vendor/rails --- a/vendor/rails +++ b/vendor/rails @@ -1 +1 @@ -Subproject ...

Are submodules for plugins or for dependencies?

Suppose Project X is the base project and Project Y depends on X. Project Y might be a plugin for Project X, or perhaps it is a standalone app that requires Project X in some other fashion. I have thought all this time that Project Y should be the superproject, and Project X should be a submodule of Project Y. However, upon reading th...

How to modify git repository to add submodules in ALL the past revisions?

I migrated my SVN repository successfully with Tags into Git using git svn-clone. However, git svn-clone does not migrate svn:externals. Hence, I decided to modify branch tree using git filter-branch. For svn:externals, first I created a separate Git repository for each svn:externals and then I tried using the following, but it didn't w...

Can't get rid of git submodule

I added some Haml templates to my Rails 3 project with git clone git://github.com/psynix/rails3_haml_scaffold_generator.git lib/generators/haml only to find, when I tried to edit some of those files, that this was a submodule, so I couldn't commit changes that I made within the lib/generators/haml directory. Now every time I git statu...

Git will not init/sync/update new submodules

Here's part of the contents of my .gitmodules file: [submodule "src/static_management"] path = src/static_management url = git://github.com/eykd/django-static-management.git [submodule "external/pyfacebook"] path = external/pyfacebook url = http://github.com/sciyoshi/pyfacebook.git However, .git/config ...

How to add a git repository as a shared dependency of another git repository?

I need something akin to submodules, but which exist outside the main repository as a dependency. Here's the problem: I'm trying to use Git (in a REALLY awkward way) to manage design files for a CAD tool (Cadsoft Eagle), and I'm having a hard time figuring out if there is a way to use git submodules to manage each project's dependenc...

Git commit to common submodule (master branch)

I've two or more projects (let's call them ProjectFoo and ProjectBar) having some common code that I put in a submodule. My understanding is that if I commit changes to a submodule from within ProjectFoo it'll be in a detached head that only all ProjectFoo clones can see: (master) $ cd ProjectFooBarCommoneSubmodule/ (master) $ git comm...

Working with Symfony and Git (collaboration)

Hello everyone, Suppose we have a Project with three applications — A, B and C. Our team: Jack, Susan and Martin. And one project leader — David. Each programmer is working on their own application: A - Jack B - Susan C - Martin So, there is a problem with source code management. How to effectively organize it with G...

Highly coupled git submodules

I have a project which needs to be split into two repositories: a set of common models, and a simulation based on those models, with additional code. Ultimately there may be multiple simulations using the same set of models, so having them in a separate repository is a definite requirement. The obvious solution is to have the common mode...

Git submodules not pulling

Hi, I have a git repo as my master project. It has some sub-modules added to it. It look like: ~/super_project/ <- main git repo ~/super_project/plugins/admin <- sub-module ~/super_project/plugins/editor <- sub-module All that's fine, its committed and working. But when I push the super project to origin/master, an...

git clone -- submodule

I'm fairly new to git and just trying to put a submodule into a repo. The problem is that when I clone the parent repo, the submodule folder is entirely empty. Is there any way to make it so that 'git clone parent' actually puts data in the submodule folder? example: http://github.com/cwolves/sequelize/tree/master/lib/ nodejs-mysql...

Git submodules and the status queue

I added two submodules to my vim repository, and the git status command always outputs this: On branch master Changed but not updated: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: bundle/snipmate modified: bundle/yankring I've ...

How to clone only a folder from a git submodule?

I'm trying to get just a folder from an external github repo to use in my project. I want my project setup to be like this: -my_project -submodule -code.py -MY_README -.git And I have the remote repo named some-submodule with this structure: -submodule -code.py -README -.gitignore So I just want the submodu...

Separate Git submodule for each Zend Framework module?

Hi, I develop a lot of Zend Framework based applications with reusable modules (e.g. mailing module, cms module etc.) Each project has it's own centralized repository and uses some of the common modules. Each time I update the module in one of the projects, it is very likely that I need to update the module in the other projects too. ...

Git submodule from just a directory of another repository

Is it possible to create a submodule that does not link to a repository directly, but to a directory inside it? For example, let fw.git be a framework repository, with these dirs: |fw.git \---|test |code |tools I'd like to submodule the framework code, just the code directory, not other directories. ...

Submodule's files are not checked out

I'm trying to add an external repo as a submodule of my repo, so I followed these instructions, doing: git submodule add git:... vendor git submodule init git submodule update then I tired: git submodule init vendor git submodule update vendor The submodule that I'm adding has submodules, and the submodule's submodules appear to to...

How can I get a git submodule's associated commit ID from a past commit in the parent clone?

Is there a way, short of actually checking out the parent commit, to determine a submodule's SHA-1 commit ID based on a commit ID in the parent clone? I know I can find the currently associated SHA-1 with 'git submodule'. Here's an example: I have a clone with a single submodule 'foo' that has changed several times in the last month. I ...