Questions tagged [git-submodules]

Submodules allow you to keep a Git repository as a subdirectory of another Git repository.

A submodule allows you to keep a Git repository as a subdirectory of another Git repository. This lets you clone another repository into your project and keep your commits separate. [Pro Git book]

The parent repo keep track of a submodule in:

  • a .gitmodules file (for the url of the sub repo)
  • a special entry in its index, called gitlink for the commit hash at which the submodule is checked out (a submodule is always initialized in a detached HEAD mode)

Common questions:

3102 questions
1
vote
1 answer

Git-Submodule dependencies vs. Visual Studio dependencies

I do have the following respsitory dependencies: Using submodules clonging Repo 1 recursivly (git clone --recurse-submodules -j8 {repo-path}) would add the following folder structure to my drive: Of course I have a clone of the Repo 2 somewhere…
RadioMan85
  • 337
  • 1
  • 11
1
vote
0 answers

Android alternative for Swift Package Manager?

I am working on creating a modularised app. I had been using git submodules, but AFAIK, Swift Package Manager (SPM) in iOS works as a wrapper around git submodule. Can you please suggest Android alternative for it so that I don't have to use git…
1
vote
0 answers

Why does git submodule build depend on node modules of parent project?

https://github.com/hyperbotauthor/chessopsnpmts This project has a git submodule, which in separation builds according to its own package.json's build script. [submodule "chessground"] path = chessground url =…
hyperbotauthor
  • 307
  • 1
  • 4
  • 13
1
vote
0 answers

Get GIT Submodule history only until a specified date in history

I have a main project and a bunch of submodule libraries inside it. The below gave me a truncated history. (I dont care what happened before this) git clone --shallow-since=2021-01-01 Now, I would like to clone a submodule in the same…
1
vote
1 answer

Unwanted submodules pushing to GitHub

Every time I push a file to Github it uploads as a submodule! How do I keep this from happening? Is there a way to reverse the submodule and upload like the rest of the files inside of the folder?
1
vote
1 answer

Add pre commit hook to submodule from parent module's .git

So I have a project with a submodule that gets updated every once in awhile. I have some rules for commits that I try to follow and one of them is to include the branchname in the commit. I accomplish this with githooks as follows: From top level…
1
vote
0 answers

Git submodule inside another external submodule

I'm trying to set up on (my .dotfile repository)[https://github.com/mike-fam/.dotfiles]. I want to install Oh-my-zsh when I clone this repository, so I added it as a submodule to my directory by running git submodule add…
Mike Pham
  • 437
  • 6
  • 17
1
vote
1 answer

Is there a way to add submodules to a bare git repository?

I have some repos on my server with gitosis. One of them is Main, it's including all the others. I work with them from my local machine, and submodules hierarchy was built on my local machine. Gitosis has repos as bare(?) so, it's impossible to…
tijagi
  • 1,124
  • 1
  • 13
  • 31
1
vote
1 answer

What is the proper workflow for being able to update code within a Git Submodule?

I'm trying to implement a shared library as a Git submodule and I'm struggling with the best practice for pushing changes within the submodule folder. I can get it to work but it feels awkward. This is my test repo…
Josh Russo
  • 3,080
  • 2
  • 41
  • 62
1
vote
0 answers

Including header files pulled as a git submodule in a C++ file

I've got some C++ code that depends on a submodule pulled from Git. The files are being developed as an Arduino library, and the submodule dependency is also an Arduino library. Both are compiled through the stable version of the Arduino IDE…
Vijay Shastri
  • 53
  • 1
  • 5
1
vote
0 answers

Compile and link library at once in CMake

I'm new in CMake enviroment. I have this project-structure tree: /my_proj │ ├── deps │   └── my_dep │   └── CMakeLists.txt ├── src │ └── main.cpp └── CMakeLists.txt Where my_dep is a git submodule used as dependency for my_proj…
1
vote
1 answer

using Nuclio functions with provided python bulky code: possible?

so my situation, I have been trying to distribute the load of python based some data science pipelines and, after much searching and some QA (Scale out jobs with high memory consumption but low computing power within AWS and using Docker: finding…
1
vote
0 answers

Why isn't it possible to set up a git repo including submodules in Docker?

Is there a proper way to initialize a git-Repository and included sub-repositories inside a docker? As I have spent several hours on this and couldn't find a solution I switched back to the setup by shell-scripts outside the docker. The idea was to…
Qohelet
  • 1,459
  • 4
  • 24
  • 41
1
vote
1 answer

How to connect a Gitlab self managed submodule to deepsource.io

I want to connect a git Submodule to deepsource.io. It says I need to connect it via SSH. The main repository is hosted on Github, and the Submodule is hosted by Git lab self-managed (git.server.com). Where do I have to paste the public SSH key…
chraebsli
  • 184
  • 12
1
vote
1 answer

How do i specify to download some submodules in .gitsubmodule?

There are too many submodule in .gitsubmodule, and downloading all of them will take a lot of time. How can I choose to download only the modules I need.
Hugh Men
  • 11
  • 2
1 2 3
99
100