Relative Content

Tag Archive for gitgit-submodules

how can I find out if a git submodule has new commits

We have quite a few repositories with submodules and we would like to report which submodules are candidates for upgrading because the repository they refer to has new commits. Is there a way to do this without changing the currently checked out version?

Git not tracking changes after submodule deletion

Tried to use a submodule which had its own submodules, unsuccessfully, as the submodules never populated even with every manner of submodule update, sync –recursive, etc. So just removed the submodule and its associated .submodule entry, and trying to add the project as some static files from a zip in the old location. The problem is, git just seems to be entirely ignoring anything in that folder. Tried to reclone, tried stashing differences, tried deleting cache.

Manage conflicted sub modules in Git

Let’s say I have repo A with sub module B. A is a standalone project:
A –B
Than I create repo C with two sub module A and B:
C-A
C-B
In this case (A is not stand alone) I do not want A to include the sub module B because it is already included in the main project C. How can I do it only for repo C without changing repo A ??
TX

How to fix git repo after replacing directory with submodule

If you replace a subdirectory in a git repo with an identically named submodule, it can break git fetch entirely. Here is a reproducer. In this case the subdirectory contains another submodule which I’m not sure is necessary to reproduce the issue, but it is the situation that caused the bug for us in Gitlab CI, which optionally reuses git directories for unrelated builds.

git submodule Redirection

Is it possible to configure git to checkout submodules from a different host, say dev.azure.com instead of the url, say github.com, stored in the repo?

Adding local repo as submodule always resolves to Github

This is such a bizarre thing. I’m trying to add local repo ProjectB as a submodule of ProjectA. I’m very familiar with the process and commands to work with submodules, but trying to run git submodule add ../ProjectB Project in the root of ProjectA causes git to try to clone from Github, not the local repo (I’ve omitted from this the other submodule commands, but they were run). I’ve tried multiple times, resetting everything each time (.gitmodules, .git/config, .git/modules/ProjectB)