Tag: git submodules

Git mirroring a repo with all submodules to another repo

I mirrored https://github.com/boostorg/boost.git to my own repository with command: git clone –recursive https://github.com/boostorg/boost.git cd boost git push –mirror ‘URLOfMyOwnRepo’ in order to mirror all the submodules. However, it didn’t work out the way I expected. Basically what I want to do is a N-to-1 mirroring, so I can review the source on my own repo […]

How to auto deploying git repositories with submodules on AWS?

I have a submodule in my git repository and my directory structure is like, app — folder1 — folder2 — submodule @5855 I have deployed my code on AWS by using autodeploy service. Now, on server I have code in the parent-directory but submodule directories are empty. Q1) How can I get data in submodules. […]

How to reduce the memory footprint for multiple submodules of the same source?

I have a big project containing multiple Git submodules. A main project uses a collection of different libraries and some libraries use libraries themself. All libraries are useable in a standonlone fashion, so they all need a submodule containing the test infrastructure (VUnit and UVVM). The tree of Git submodules looks like this: ProjectA o- […]

How can I force line endings to LF in submodules via .gitattributes in the parent project?

I’ve got a repository that stores all of my Vim settings. It uses submodules to pull in plugins with Pathogen (I’ve looked at other plugin managers, not interested so far). Due to the way MSYSGit handles line endings when opening Vim for commit messages, I need to have the repository stored with Unix line endings […]

Detecting current directory in bash script

I am attempting to write a script that initializes my git hooks differently whether my git repo is a submodule or just a regular repository. It currently looks like this: # Get to root directory of client repository if [[ “:$PATH:” != *”:.git/modules:”* ]]; then # Presumed not being used as a submodule cd ../../ […]

Git submodule management strategy

We use GIT to manage our project. Each project has a “core” (like a framework from who we’ll built the project) So each project has at least 2 remotes branches: 1 repository for that core framework. 1 repository per client project. We also have modules. Each module have a core that contain the basic functionnality, […]

Does git change submodule reference when switching branch

here is the situation i faced. I have a repo containing a submodule. In the repo, i created a new branch to do some editing. Then i found out i need an updated submodule, so i pulled down the submodule and kept working. I made a commit afterward, and merge the branch back to the […]

Submodules and 'git pull –rebase'

We recently switched to git and are trying to use Submodules to include our Common libraries. No matter what we do we can not get ‘git pull –rebase’ to work in the Super or Submodule. We get: james:libraries james$ git pull –rebase Cannot pull with rebase: You have unstaged changes. Please commit or stash them. […]

updating submodules with git-flow

When making a release with git, using the git-flow model, I switch my repository to point to the latest commit in master, tag and then build from the tag. Is it good practice to merge changes into master for all the repository’s submodules, and have them point to master (that is, the latest commit in […]

git add -p –ignore-submodules?

Is there a way to ignore dirty submodules when using git add –patch? I’ve set ignore = dirty as explained here. This seems to only work with git status and git diff. I love git add -p. Having to skip through 10 dirty submodules every time I want to add a small change frustrates me. […]

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