Tag: git submodules

Why does git fail to fetch specific valid submodule for a given commit and how to fix it?

I have a git repo which has another one as a submodule dependency. In the root of my project (where the .git, .gitsubmodules etc. are) I called git submodule update This failed with the following message: Fetched in submodule path ‘src/framework’, but it did not contain cc8c38e9d853491c672452d8dbced4666fc73ec8. Direct fetching of that commit failed. where src/framework […]

Convert git repo into a submodule AND move .git directory to superepo

I have a super repo and a few submodules in this repo: MY_SUPER_REPO my_sub_1 my_sub_2 Now I am creating a new directory that will later become a submodule: my_dir_3 When I am ready for it to become a sub repo I do: git init git remote add origin URL I then go to the super […]

What's the equivalent in Git to a read-only component in ClearCase?

My company is in the process of changing our version control tool from Rational ClearCase to Git. We have the following development scenario, and we’re curious if there’s a proper pattern to follow with Git to achieve the same behavior we have in ClearCase. Here are some basic points about our situation: We have a […]

Download git submodules for tarball

Is it possible to download submodules for a repository with only the working directory? If I download a tarball of a repository from GitHub, that is equivalent to a shallow clone without the .git folder, is it at all possible to “download” the submodules into the working directory? I tried git init && git submodule […]

Multiple Android projects with same GIT submodule

I recently wanted to adopt submodules from GIT with my Android projects but stumbled into some problems. Backstory I have multiple projects but many use the same external library (Android library-project), in order to make the GIT cleaner and make the GIT for each project contain all the needed material I though of using GIT […]

Can I put a .gitmodules file in a subdirectory?

Let’s say my repo index root is in /project dir. Should the .gitmodules also be inside this dir, or can I put it into, say /project/subdir? The reason I would like to do that is because I have multiple contributors and I want each to be responsible for his own set of submodules.

git plugin in Jenkins on Windows does not use credentials with submodule

I have an issue with Jenkins on Windows with git, I can use ssh credentials to fetch git repository from BitBucket but when it tries to fetch the submodule repository, which is on the same account, I get permission exception. Fetching upstream changes from git@bitbucket.org:mycomp/at.git C:\CI\Git\bin\git.exe –version using GIT_SSH to set credentials Bitbucket key C:\CI\Git\bin\git.exe […]

Best way to migrate mercurial repo with subrepositories to git, preserving history?

I’m trying to migrate a mercurial repository to git, but the problem is that the mercurial repository has subrepositories (some with branches), and lots of merges and branches itself. I’d like the final git repository to keep all this history and be correct and complete when checking out earlier parts of the repository or other […]

Git Submodule Files showing red in XCode when moving to different Mac

Here are the details of my problem: I have a directory structure that looks like: where ios-src is all my project and source files and ios-libs is where all my git submodules live. When I clone the project to a different machine, all the files in the ios-libs directory show up as red (or missing) […]

Is it possible to add/initiate a new git submodule with the ignore option set to a certain value?

I have a script that sets up a project for me and my co-workers. We are using git submodules inside our repository. The script I’ve made creates untracked config files inside the submodules’ directories (cabal’s sandbox config files to be more specific). I’m never going to modify the submodules, will never push any changes. I […]

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