Tag: git submodules

Git fetch submodules from latest gitmodule

Suppose I am on commit a which has submodule s1 and somebody added submodule s2 in commit a+1, now I don’t want to move to a+1 but fetch(just download) submodule s2. Is this possible? my git version is 2.1.4 I can get 2.10.1.windows.1 if required to update Edit: simple script I tried, it has some […]

Migrate from svn to git keeping svn-externals

I am migrating from an svn repository to git. This svn repository has svn-externals, to be kept on svn repositories. These external are versioned and tagged in the history, and are read only. How I can properly migrate and have the svn-externals in the new git repository properly set? I am looking in “git svn […]

GIT sub submodule strange behaviour

I have three repositories: A, B and C. In my repository A, I created a submodule toward B (A/library/B). In my repository B, I created a submodule toward C (A/library/B/library/C). I want to create a new branch on my repository C: git clone –recursive C cd C git checkout -b branch-test git touch test git […]

Git auto patch submodule

I have a C++ project with a submodule (which I have only read permission). Early it was just a copy of code instead of submodule. And during the work this copy has been changed a bit. So, how can I make a auto applying these changes after each submodule update? It’s really small changes, but […]

commit submodule using commit details from the parent in appveyor

In an Appveyor build, I’m trying to commit a submodule using commit details from the parent repo as follows: git commit -m $(git –git-dir=../.git log -1 –oneline) The reason I’m doing this is because I’ve got a static site generator repository that builds static content into a GitHub pages submodule, when changes to the parent […]

convert mercurial repo with submodules to git repo with submodules keeping history

Is there already a tool around which allows to convert a hg repo with hg sub-repos to a git repo with git sub-repos while keeping the sub-repo state history? It would be nice to know the sub-repo state on each commit.

with git submodules, can I always get branch/HEAD when cloning?

With git 1.8.2+ you can track branches as described in this answer. But compared to svn-externals without revision you seem to have to manually update your submodules when you intend to always build with latest revision of your submodules: git clone <URL/TO/MY/COMPOSITE/PROJECT> –branch develop –recursive git submodule update –remote Is there a way to always […]

GIT => Manage multiple repository in same visual studio 2017 solution

I have many projects (PRJ1, PRJ2, ..) who reference “Libraries projects” (DLL1, DLL2, …). I want open Solution1 in Visual Studio who contains PRJ1 and DLL1. And when i commit change, it push on PRJ1 repository and DLL1 repository. If an another user have only DLL1 opened on his computer, he can see the changes […]

Cmake : several projects using custom target to make test

Let say I have a library ProjectA where I defined a custom target build-tests in my CMakefile to build my tests such that I can do make test afterwards. (see CMake & CTest : make test doesn't build tests). Then, I have a second library ProjectB that depends on ProjectA. I use git submodule such […]

How do I add sub directory of directory as a git submodule?

I’m trying to add a submodule, as I normally would do, I did: git submodule add -f -b master ‘https://github.com/OrganicDesign/extensions/tree/master/MediaWiki/PdfBook/’ Only it gives me fatal: repository ‘https://github.com/OrganicDesign/extensions/MediaWiki/PdfBook/’ not found since it does not recognize this as a git repository. Is there anyway to add this submodule (without having to fork anything; so I can keep […]

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