Tag: git submodules

Git subtree or GitSlave as alternatives to Git Submodules?

I feel that using Git submodules is somehow troublesome for my development workflow. I found out that Git subtree and gitslave might be a better solution. I can’t find any comparison information about these 2 options. Questions Which is better and why? Do these 2 have a windows version to work with?

Nested git repositories without remotes (a.k.a. git submodule without remotes)

I have a project of which I am interested in breaking out portions as open-source. I’ve set up a “main” git repository (say, in a directory “main”) and sub-repositories in “main/one”, “main/two”, “main/three”. I thought that by going into “main” and doing git add one git add two git add three (note the lack of […]

How do I move an existing Git submodule within a Git repository?

I would like to change the directory name of a Git submodule in my Git superproject. Lets suppose I have the following entry in my .gitmodules file: [submodule “.emacs.d/vimpulse”] path = .emacs.d/vimpulse url = git://gitorious.org/vimpulse/vimpulse.git What do I have to type to move the .emacs.d/vimpulse directory to .emacs.d/vendor/vimpulse without deleting it first (explained here and […]

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 […]

Git submodules and ssh access

I have some trouble with a git repository that contains several submodules. The super git repository was constructed with the commands mkdir projectname cd projectname git init git submodule add ssh://myusername@server/pathtorepos When a different user (“otheruser”) then clones the super repository everything seems to work out. But when it is time to get access to […]

How do I add a submodule to a sub-directory?

I have a git repo in ~/.janus/ with a bunch of submodules in it. I want to add a submodule in ~/.janus/snipmate-snippets/snippets/, but when I run git submodule add <git@github.com:…> in the snipmate-snippets directory, I get the following error message: You need to run this command from the toplevel of the working tree. So the […]

How to apply a git patch from one repository to another?

I have two repositories, one is the main repo for a library, and the other is a project using that library. If I make a fix to the in the subservient project, I’d like an easy way to apply that patch back upstream. The file’s location is different in each repository. Main repo: www.playdar.org/static/playdar.js Project: […]

Git diff says subproject is dirty

I have just run a git diff, and I am getting the following output for all of my approx 10 submodules diff –git a/.vim/bundle/bufexplorer b/.vim/bundle/bufexplorer — a/.vim/bundle/bufexplorer +++ b/.vim/bundle/bufexplorer @@ -1 +1 @@ -Subproject commit 8c75e65b647238febd0257658b150f717a136359 +Subproject commit 8c75e65b647238febd0257658b150f717a136359-dirty What does this mean? How do I fix it?

.gitignore files added inside Git submodules

I recently reorganized my dotfiles to live inside a Git repository at ~/Dropbox/dotfiles and I’m using pathogen to bundle all Vim addons inside ~/Dropbox/dotfiles/home/.vim/bundle. These addons were added as Git submodules. Now the problem is, when I run Vim, it automatically generates the documentation for all addons and puts them inside each submodule directory. This […]

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 […]

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