git-submodules

Git nested submodules and dependencies

Let's say I have four projects named Core, A, B, Super. The dependency tree is like this: Super ---> Core |-> A -> Core |-> B -> Core I want each project to be stand-alone, that is, I want to be able to check-out and compile each project on its own (each with its dependencies of course). I thought about mapping each pr...

Need to handle git-submodules in git-archive

I need to pack git submodules inside of tarball which I create with git-archive. I see that in 1.6.5 git-archive does not support git submodules. I see several scripts to handle this case in the net, but I'm not sure which one to pick. What is the best / most official way to do this? I've ended up using with working copy on a dedicat...

Git submodules workflow

In my project I need to use third party code, stored in several Git repositories. My project is also stored in (separate) Git repository. There are several people working with me on the main project, and I'm the maintainer. In earlier projects I used to copy dependencies manually to the Git working tree, adding a little file specifying ...

Git submodules: Specify a branch/tag

How does git submodule add -b work? After adding a submodule with a specific branch, a new cloned repo (after git submodule update --init) will be at a specific commit, not the branch itself (git status on the submodule shows "Not currently on any branch"). I can't find any information on .gitmodules or .git/config about the submodule'...

How do you work with a git repository within another repository?

I have a git media repository that I'm keeping all of my javascript and css master files and scripts that I'll use on various projects. My question is if I create a new project that's in it's own git repository, how do I use javascript files from my media repository in my new project in a way that makes it so I don't have to update both ...

git submodule update

hi to everyone. I've spent some time on reading and rereading git submodule documentation and tutorials, and its getting clearer. I do see however that there are a few issues with it, and Im afraid to start using it heavily in my code base before i understand the implications. specifically Im not clear on what the following means (from ...

git submodule update needed only initially?

hello. I'm getting a hang of git submodule (wishful thinking?) and I'm coming up with more specific questions, which is a good sign... I've tried to find the which revision of the submodule the superproject refers to, in .gitmodules and .git/config, but nothing is mentioned there... The scenario is that I'm changing submodules in thei...

Creating submodules in a recently converted svn to git repo

I have just recently converted an old company svn repo which has a bunch of projects into a git repo ie. repo project-1 project-2 project..n From within this new git repo how would you recommend creating a submodule for each individual project? ...

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 submodule head

I have a project with a submodule that is pointing to an invalid commit: the submodule commit remained local and when I try to fetch it from another repo I get: $ git submodule update fatal: reference is not a tree: 2d7cfbd09fc96c04c4c41148d44ed7778add6b43 Unable to checkout '2d7cfbd09fc96c04c4c41148d44ed7778add6b43' in submodule path '...

How to determine sub-module SHA-1 with gitweb?

I want to determine the associated SHA-1 of a submodule without cloning anything - i.e. remotely. git-ls-remote doesn't show this information, so my initial approach was to scrape the XHTML from gitweb and pull the SHA-1 out of there. Unfortunately, gitweb seems to have pretty poor support for submodules, showing 404 and 500 "unknown ob...

Can't update submodules (they are empty) after merging branch w/o modules with branch w/ modules

Hi all, I'm using Kohana and recently I wanted to change kohana modules into git submodules for easier updating. To clarify, I will refer to modules as kohana modules (just folders) and submodules to actual git submodules. I switched to master branch and deleted all the modules and replaced them with submodules from http://github.com/...

Reuse a Part of a git Repository

Hi everybody. I have the following project setup: Solution A Project 1 (a lightweight component) Project 2 (contains a lot of files and depends on Project 1) Solution A is a single git repository. Then I created another solution and found that I could reuse and even update the functionality of Project 1. So my second solution would...

How can I do git checkout on a repository with submodules?

Suppose I have a repository X with a sub module A. Now suppose I want X to have two branches: master and development. I want master to have a different revision of A than development does. How can I switch back and forth between these branches? I've got a repository set up that does this (but using real names instead of fake ones!)....

What's happened to my directory on GitHub?

I added a new subdir within my git respository: git add feeds Then commited this and pushed it up to GitHub but it seems as though I've commited a symlink / shortcut but not the actual directory and files within. See here: http://github.com/G4EGK/RSS-Reader Any idea what 'feeds' is? I'd like to remove that and correctly add my file...

git reference common directory/repo

Project layout: /project_a /shared /project_b /shared /shared project_a and project_b both need to contain the shared folder. With svn, we used svn:externalsand that worked fine, since svn can reference subdirs (with relative paths too). However, we moved to git and it seems to not support checking out subdirs. Our solution no...

Sharing code between two or more rails apps... alternatives to git submodules?

We have two separate rails_app, foo/ and bar/ (separate for good reason). They both depend on some models, etc. in a common/ folder, currently parallel to foo and bar. Our current svn setup uses svn:externals to share common/. This weekend we wanted to try out git. After much research, it appears that the "kosher" way to solve this is u...

git submodule, ignoring the wrong directory

I am new to git but have spent a good deal of time reading through documentation and gotchas on git submodules before trying them. I am having a problem that I feel -- probably naively -- is a bug in git: I have a project, in that root directory I have a plugins folder, which has a submodule called myplugin. I added it with git subm...

Proper use of submodules in .NET solutions

I have a library I wrote with a structure like this: SolutionA\ --Source\ --Core\ --Tests\ --Tools\ --TestFramework\ --MockTool\ SolutionA.sln I want to include this as a submodule for SolutionB. If I use this entire structure as a submodule, it would get a bunch of stuff that SolutionB doesn't care about; it doesn't care abo...

How to make top-level git to track all the files under another sub-directory git

command sequence mkdir topdir mkdir another-git-directory touch fileC touch fileD git add . git commit -m "sub-dir init" cd .. touch fileA touch fileB git add . git commit -m "top-dir init" git ls-files // now we can see that fileC and fileD is not tracked by top-level git // git ls-files -o // this would ...