Tag: git submodules

git submodule update – why from toplevel

I’ve always been puzzled by this: $ git submodule You need to run this command from the toplevel of the working tree. Why do I need to run it from the top level directory? Is it a technical reason, or just because of a convention / possible flaw ?

Recursively cloning a git repo doesn't pull submodules

I’d like to clone a git repo [1], which has a submodule defined in .gitmodules: [submodule “PointInCircle”] path = PointInCircle url = https://github.com/midas-journal/midas-journal-843 Following these questions [2-4], I tried: $ git clone –recursive https://github.com/midas-journal/midas-journal-851 If I understand submodules correctly, which I obviously don’t, there should be a directory inside midas-journal-851 called PointInCircle with the second […]

Git Submodule in branch not master

EDIT: According to @VonC in the comments I have a nested repo, not a submodule. However my problem remains the same below: I created a branch off of my local repo to work on a new feature. The new feature required me to install the Azure PHP SDK via composer. Turns out that the Azure […]

Git won't update a directory

I have a nicely functioning git repo on Bitbucket.org. However I have one directory that doesn’t seem to be under my repo’s control. Whenever I push changes, anything in that directory is left behind. If I clone the repo into a new location, that directory shows up, but it’s empty. I think the directory contents […]

Moving library development in its own project

currently, I’m working on an Embedded Project. At the moment, I have only a local git repository, as I’m the only developer. However, I’m thinking about making it OpenSource and move it to github (if a certain level of functionality is reached 🙂 ). So, I’m thinking a lot about making a good project structure, […]

How can I include only one folder from another repository in Git?

I have a python module which looks like this. | |– my_module/ |– tests/ |– .git/ I’d like to use it in another project. Normally submodules would suffice, however, I’d rather just drop in the actual module without including anything else into my app like so. |– .git/ |– my_app/ |– my_module/ Is there a […]

Git config “bad config file line” in a submodule

I use git on Windows and Linux, and I have recently ran into a strange issue that manifests only on Windows… Let’s say I have two projects. Both are versioned in git, and each has a submodule. Project 1 the submodule config is located in C:\Projects\project1\.git\modules\plugins\tasks\config and looks like this: [core] repositoryformatversion = 0 filemode […]

modified content in git submodule, but git submodule says up to date

I cant push the changes I made to a git submodule. I have pushed the main project, and get this mainProject$ git status On branch myBranch Changes not staged for commit: (use “git add <file>…” to update what will be committed) (use “git checkout — <file>…” to discard changes in working directory) (commit or discard […]

Tagging git submodules with release

We have a project whereby we use a lot of submodules. When branching and tagging our release I would like to ensure that the submodules state is preserved with the branch and tag. So that if we need to build the release again we can ensure the submodule is the same version as what we […]

Cloning local Git repository containing a submodule with local branch

I added a submodule to my local git repository (GUI library for an embedded project.) I needed to add a couple of driver files for my hardware and added them to a local dev branch: these changes are not pushed back to the remote. My plan was to pull in changes to the master branch […]

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