Questions tagged [git-subrepo]

git-subrepo command "clones" an external git repo into a subdirectory of your repo. Later on, upstream changes can be pulled in, and local changes can be pushed back.

git-subrepo command clones an external git repo into a subdirectory of your repo. Later on, upstream changes can be pulled in, and local changes can be pushed back.This command is an improvement from git-submodule and git-subtree. All the subrepo commands use names of actual Git commands and try to do operations that are similar to their Git counterparts.

32 questions
116
votes
12 answers

Two git repositories in one directory?

Is it possible to have 2 git repositories in one directory? I'd think not, but thought I'd ask. Basically, I'd like to check in my home directory config files (e.g. .emacs) which should be common across all of the machines I work on, but have a…
Joe Casadonte
  • 15,888
  • 11
  • 45
  • 57
102
votes
4 answers

Alternatives to Git Submodules?

I feel that using Git submodules is somehow troublesome for my development workflow. I've heard about Git subtree and Gitslave. Are there more tools out there for multiple repository projects and how do they compare ? Can these tools run on…
Chau Chee Yang
  • 18,422
  • 16
  • 68
  • 132
14
votes
1 answer

git submodules , gitslave, git subtree or a simpler solution

We have a git repository with N folders. Repo |-Folder1 |-Folder2 |- ... |-FolderN With different collaborators we would like to share different folders. Each collaborator should have access only to his allowed subset of folders. What is the "good"…
Issam T.
  • 1,677
  • 1
  • 14
  • 32
8
votes
0 answers

Feature branching using git subrepos

I have a project which is using git subrepo: https://github.com/ingydotnet/git-subrepo and I'm trying to figure out how to implement feature branching as a dev workflow. Here is what I have so far: Create a branch in the monorepo Make your changes…
Ogen
  • 6,499
  • 7
  • 58
  • 124
5
votes
1 answer

Creating git submodule without a remote

I want to have a sub repo inside my main repo which can push and pull from a completely different remote repo than my main. So I want a submodule. But I want to create the submodule locally, then push it to remote. It does not exist anywhere…
Wapiti
  • 1,851
  • 2
  • 20
  • 40
5
votes
1 answer

svn to git migration with nested svn:externals

Migrating from svn with svn externals, to git. Each svn externals may have it's own svn:externals. There is no guide how to migrate svn with externals to git here that I found useful. Each branch may have it's own branches tags trunk. What's the…
2
votes
1 answer

git submodule replacement that doesn't detach heads

My situation: I have a large number of computers that I use for various tasks. I have a large number of libraries, each in its own git repo. My desire: I want to be able to modify one of the libraries on any computer, do a git commit/push; then go…
2
votes
1 answer

Git submodule - track a subfolder of a foreign Git repo

Say we are using git submodule: git submodule add https://github.com/user/repo I am wondering if there is a way to tracker a specific folder, something like this: git submodule add https://github.com/user/repo -- xxx is something like this…
Alexander Mills
  • 90,741
  • 139
  • 482
  • 817
2
votes
0 answers

Git and Git Subrep

I am newbie to Git and starting to learn it. I have been using SVN for quite a long time. I want to simulate following. I have a main repo in folder 'main'. I can pull, commit and push in this folder. I have one folder in 'main' named 'srepo'. I am…
Tanzeel
  • 21
  • 2
2
votes
1 answer

Creating multiple git sub repos inside parent git repository

I want to create a parent git repo inside which there will be multiple git repos, but I do not want parent git repo to track all commits of sub repos. Commit history can be placed in individual sub repos. I just want that When I pull from parent…
arceus
  • 327
  • 4
  • 15
1
vote
0 answers

ModuleNotFoundError: No module named 'Submodule1.Sobmodule2.Filename'

I am currently building a project with GitLab CI/CD and have come across the following Error message: ModuleNotFoundError: No module named 'Submodule1.Submodule2.filename' Submodule2 is a submodule inside Submodule1. In .gitmodules local paths…
L. T
  • 11
  • 3
1
vote
2 answers

How to change git subrepo to track a differentt branch?

I have a subrepo in an ext/[subrep] directory that I want to track a different branch. I have followed the instructions for switching subrepo branches at https://github.com/ingydotnet/git-subrepo/wiki/FAQ however, it does not seem to be…
wiyosaya
  • 95
  • 9
1
vote
1 answer

How to install git subrepo in Git for Windows running bash shell

I know there are instructions to install gitsubrepo in Git for windows here. I understand what I have to do, however, I do not know where to find the shell startup script. I have installed the Git Bash shell, and I am at a loss for where its shell…
wiyosaya
  • 95
  • 9
1
vote
1 answer

Copy Git project to new repo with submodules in tact using sourcetree

What I'm trying to accomplish I'd like to copy a wordpress "starter theme" I put together with a library of submodules from various repos. (Ex. normalize-css or scrollmagic). It works nicely in my current project folder but when I try to copy the…
Tom
  • 314
  • 2
  • 14
1
vote
1 answer

add modified git submodule which is not owned

Is it possible to add a git submodule that you modified localy but of which you are not the owner and therefore can not push to remote. Currently my repo only adds a link to the original submodule, but without my modifcations to it. But i want the…
gustavz
  • 2,964
  • 3
  • 25
  • 47
1
2 3