Tag: git-submodules

How to push commits from changes made to a submodule into main git repo?

I have decided to switch from SVN to git for my app repository. My repo structure is like this: ~/AndroidStudioProjects/MyMine $ tree -L 1 . ├── ActionBarSherlock ├── Android-Universal-Image-Loader ├── Android-ViewPagerIndicator ├── Crouton ├── ListViewAnimations ├── MyMine ├── SlidingMenu ├── aFileChooser ├── drag-sort-listview └── out 10 directories, 0 files As you can see, I have […]

Git: Get a subfolder from a repository to a new one without losing history

I have a git repository of an application with multiple branches. The source tree consists of several directories. E.g: main_folder |–> .git |–> dir0 |–> dir1 |–> dir2 Unfortunately, from the beginning of the development I didn’t use git-submodules nor git-subtree. Now I want to move one of the directories, e.g dir0 to a new […]

git submodules as part of a build

I am trying to setup a git repository with a submodule repository inside it. Lets call the 2 repos: Super & Sub for this example. So I initialized the Super repo then did a git submodule add of the 2nd repo. I committed the .gitmodules file with the Super repo so that when you do […]

Convert git repo to submodule

So I am fairly new to the whole git topic. But what I am trying to do is syncing my dotfiles across multiple machines. I know there are plenty of tutorials out there and I got the basic concept. But my question is a tick more specific. First things first: I am using Windows (for […]

Sharing Models between two Rails Projects – using git submodules?

I have a Rails website which has been divided into two separate projects – the public site, and the administration site. As both sites are using the same database the models are shared between the applications (actually right now they are duplicated). The problem I have here is that when an update to the models […]

How can I use a git repository in my parent git project?

I tried using submodules to keep a copy from github repository inside my 3rd party directory. After creating and fetching the files, when I commit from project it only see the folder, no the files (and yes, the files are there). Is there a specific command?

Git submodule's commit matching a tag in the main repo

After I check out a tag and do git status, it shows me: # modified: submodules/bcg729 (new commits) # modified: submodules/belle-sip (new commits) # modified: submodules/externals/ffmpeg (new commits) git submodule update checks out earlier commits. But in .gitmodules there’s no info about specific commits in submodules when the tag was created. How does git knows […]

Cannot trigger post-commit git hook on git submodule

We use a git module with several submodules. In order to make it more convenient for daily use, I wanted to have a post-commit hook which automatically adds the submodule to the git index in the main/super/root git repo/clone/module such as git add mychangedsubmodulename so as to prepare a commit ready to update the submodule’s […]

How does git handle cloning another repository into a subdirectory?

I just cloned a repository into a subdirectory of another repository, and git actually appeared to handle the situation pretty intelligently. I know about submodules, but I thought they always had to be explicitly defined and I didn’t think git had this functionality. What happened? Here’s my shell session: https://gist.github.com/858131

How to use SSH instead of HTTP for Git submodules?

Why are people having this problem? $ git clone –recursive git@github.com:acani/Chats.git Cloning into ‘Chats’… Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. https://github.com/acani/Chats/issues/53#issuecomment-118014684 I’ve read some answers that say to change the submodule URL from SSH to HTTP, but why […]

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