Tag: git submodules

How to move Git submodule to sub-directory?

guys, I just used submodule to organize some Git repos, here’s the address: repos I want to move all the submodule into a new directory called repos, for examples, jquery -> repos/jquery. I change the .gitmodules file, but seems it doesn’t work. What should I do?

Why hg always commit a git submodule, even if it hasn't changed?

I have a hg repository, with a hg subrepository, which has some git submodules. (I know this sounds completely insane, but it’s working with svn repos in google code, in libs in github and modules in bitbucket. I’m using code freely made available by a bunch of people, WHO AM I to complain about their […]

How to deal with Git Submodules in Visual Studio solutions with different layout?

We develop with Visual Studio 2010 (in C#) and migrated a while ago from SVN to GIT. Now we try to split up our repository (which is quite big – ~30.000 files) to many git repositories – one for each solution. The solutions share some projects, mostly libraries we develop in-house and like to add […]

What's the status of my git submodule, and how can I clean it up?

Being a relative submodules noob, I wanted to update my submodule with from its origin, and did: git pull This resulted in: remote: Counting objects: 111, done. remote: Compressing objects: 100% (3/3), done. remote: Total 57 (delta 54), reused 57 (delta 54) Unpacking objects: 100% (57/57), done. From github.com:eteanga/smarty 8e9a011..818ab3e master -> origin/master You are […]

Workflow for using git submodules in Visual Studio

I have some shared code I want to share among a number of solutions. Most examples use the command line, but I want to do it using Visual Studio 2013 (and/or TortoiseGit)? – SolutionShared – .git – Project1Shared – Project2Shared – Solution1 – .git – ProjectFoo – ProjectBar – [SolutionShared] – [Project1Shared] – [Project2Shared] – […]

Git submodule pull request work flow

I am curious about some best practices. There is a git repo that I would like to include as a submodule in my project. I would also like to contribute to this repo and offer pull requests. I have forked the repo and would like to add my fork as the submodule to my project. […]

git submodule commit/push/pull

I’d like to use git submodule. The steps I need to take to push my changes to my project are add/commit/push from submodule directory add/commit/push from parent directory Steps I need to take to pull changes of my project. git pull from parent directory git submodule update from parent directory Steps for updating the submodule […]

Reuse a Part of a git Repository

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

How to merge a git repository with submodules into another with subtree merge?

I have a dotfiles repository. I want to merge another one with submodules (prezto) into it, so I can conveniently have everything in one repository without the inconvenience of submodules. How can I subtree merge prezto into my dotfiles repository with all its submodules? I can use submodules, I can split and merge subtrees either […]

Can you develop directly in Git submodules?

I have two projects (A & B). They both use project Common. I want to include Common into A & B via submodules because then I can directly tie each commit in A & B to which commit they rely on in Common. In the past I tried to get my team using submodules like […]

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