Have multiple git projects in one
Im new at git and i don't have idea to do that.
Im building a template, which have a module pack and the module pack contains modules.
The modules can be instalated for separate and can have multiple versions of the same module (pro, simple..). (I think i can do branch in my module folder).
The pack of modules can instaled without template but need to have modules inside with the last version of they and this pack modules can have a version too, for example version one include module 1,2,3 ...
And finaly i have the template which have files too and the package of modules which have to had the last version of them.
In resume, i need to controll versions of all together and separate, but i have to had all of them in the same place
I think I could do this
-- Template (git folder)
-- Module pack (git folder)
-- Module 1 (git folder)
-- Pro version (branch)
-- Simple version (branch)
-- Module 2 (git folder)
-- ....
Is this posible or I should think in other methods ? Thank you.
git github
add a comment |
Im new at git and i don't have idea to do that.
Im building a template, which have a module pack and the module pack contains modules.
The modules can be instalated for separate and can have multiple versions of the same module (pro, simple..). (I think i can do branch in my module folder).
The pack of modules can instaled without template but need to have modules inside with the last version of they and this pack modules can have a version too, for example version one include module 1,2,3 ...
And finaly i have the template which have files too and the package of modules which have to had the last version of them.
In resume, i need to controll versions of all together and separate, but i have to had all of them in the same place
I think I could do this
-- Template (git folder)
-- Module pack (git folder)
-- Module 1 (git folder)
-- Pro version (branch)
-- Simple version (branch)
-- Module 2 (git folder)
-- ....
Is this posible or I should think in other methods ? Thank you.
git github
We have no idea of what you mean by template or module. git doesn't know and care about what you store in a repo. You can store any kind of file you want, and create whatever branches you find useful to create. Don't confuse the sources, stored in git, and the artifacts that your build procedure creates, which are normally not stored in git.
– JB Nizet
Dec 29 '18 at 13:38
1
git submodules, The Book, git subtrees.
– phd
Dec 29 '18 at 14:25
add a comment |
Im new at git and i don't have idea to do that.
Im building a template, which have a module pack and the module pack contains modules.
The modules can be instalated for separate and can have multiple versions of the same module (pro, simple..). (I think i can do branch in my module folder).
The pack of modules can instaled without template but need to have modules inside with the last version of they and this pack modules can have a version too, for example version one include module 1,2,3 ...
And finaly i have the template which have files too and the package of modules which have to had the last version of them.
In resume, i need to controll versions of all together and separate, but i have to had all of them in the same place
I think I could do this
-- Template (git folder)
-- Module pack (git folder)
-- Module 1 (git folder)
-- Pro version (branch)
-- Simple version (branch)
-- Module 2 (git folder)
-- ....
Is this posible or I should think in other methods ? Thank you.
git github
Im new at git and i don't have idea to do that.
Im building a template, which have a module pack and the module pack contains modules.
The modules can be instalated for separate and can have multiple versions of the same module (pro, simple..). (I think i can do branch in my module folder).
The pack of modules can instaled without template but need to have modules inside with the last version of they and this pack modules can have a version too, for example version one include module 1,2,3 ...
And finaly i have the template which have files too and the package of modules which have to had the last version of them.
In resume, i need to controll versions of all together and separate, but i have to had all of them in the same place
I think I could do this
-- Template (git folder)
-- Module pack (git folder)
-- Module 1 (git folder)
-- Pro version (branch)
-- Simple version (branch)
-- Module 2 (git folder)
-- ....
Is this posible or I should think in other methods ? Thank you.
git github
git github
asked Dec 29 '18 at 13:14
Jordi CastilloJordi Castillo
376
376
We have no idea of what you mean by template or module. git doesn't know and care about what you store in a repo. You can store any kind of file you want, and create whatever branches you find useful to create. Don't confuse the sources, stored in git, and the artifacts that your build procedure creates, which are normally not stored in git.
– JB Nizet
Dec 29 '18 at 13:38
1
git submodules, The Book, git subtrees.
– phd
Dec 29 '18 at 14:25
add a comment |
We have no idea of what you mean by template or module. git doesn't know and care about what you store in a repo. You can store any kind of file you want, and create whatever branches you find useful to create. Don't confuse the sources, stored in git, and the artifacts that your build procedure creates, which are normally not stored in git.
– JB Nizet
Dec 29 '18 at 13:38
1
git submodules, The Book, git subtrees.
– phd
Dec 29 '18 at 14:25
We have no idea of what you mean by template or module. git doesn't know and care about what you store in a repo. You can store any kind of file you want, and create whatever branches you find useful to create. Don't confuse the sources, stored in git, and the artifacts that your build procedure creates, which are normally not stored in git.
– JB Nizet
Dec 29 '18 at 13:38
We have no idea of what you mean by template or module. git doesn't know and care about what you store in a repo. You can store any kind of file you want, and create whatever branches you find useful to create. Don't confuse the sources, stored in git, and the artifacts that your build procedure creates, which are normally not stored in git.
– JB Nizet
Dec 29 '18 at 13:38
1
1
git submodules, The Book, git subtrees.
– phd
Dec 29 '18 at 14:25
git submodules, The Book, git subtrees.
– phd
Dec 29 '18 at 14:25
add a comment |
1 Answer
1
active
oldest
votes
I just have a solution for your problem - gil (git links) tool
It allows to describe and manage complex git repositories dependencies.
Also it provides a solution to the git recursive submodules dependency problem.
Consider you have the following project dependencies:
sample git repository dependency graph
Then you can define .gitlinks file with repositories relation description:
# Projects
CppBenchmark CppBenchmark https://github.com/chronoxor/CppBenchmark.git master
CppCommon CppCommon https://github.com/chronoxor/CppCommon.git master
CppLogging CppLogging https://github.com/chronoxor/CppLogging.git master
# Modules
Catch2 modules/Catch2 https://github.com/catchorg/Catch2.git master
cpp-optparse modules/cpp-optparse https://github.com/weisslj/cpp-optparse.git master
fmt modules/fmt https://github.com/fmtlib/fmt.git master
HdrHistogram modules/HdrHistogram https://github.com/HdrHistogram/HdrHistogram_c.git master
zlib modules/zlib https://github.com/madler/zlib.git master
# Scripts
build scripts/build https://github.com/chronoxor/CppBuildScripts.git master
cmake scripts/cmake https://github.com/chronoxor/CppCMakeScripts.git master
Each line describe git link in the following format:
- Unique name of the repository
- Relative path of the repository (started from the path of .gitlinks file)
- Git repository which will be used in git clone command
- Repository branch to checkout
Empty line or line started with # are not parsed (treated as comment).
Finally you have to update your root sample repository:
# Clone and link all git links dependencies from .gitlinks file
gil clone
gil link
# The same result with a single command
gil update
As the result you'll clone all required projects and link them to each other in a proper way.
If you want to commit all changes in some repository with all changes in child linked repositories you can do it with a single command:
gil commit -a -m "Some big update"
Pull, push commands works in a similar way:
gil pull
gil push
Gil (git links) tool supports the following commands:
usage: gil command arguments
Supported commands:
help - show this help
context - command will show the current git link context of the current directory
clone - clone all repositories that are missed in the current context
link - link all repositories that are missed in the current context
update - clone and link in a single operation
pull - pull all repositories in the current directory
push - push all repositories in the current directory
commit - commit all repositories in the current directory
More about git recursive submodules dependency problem.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53969893%2fhave-multiple-git-projects-in-one%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I just have a solution for your problem - gil (git links) tool
It allows to describe and manage complex git repositories dependencies.
Also it provides a solution to the git recursive submodules dependency problem.
Consider you have the following project dependencies:
sample git repository dependency graph
Then you can define .gitlinks file with repositories relation description:
# Projects
CppBenchmark CppBenchmark https://github.com/chronoxor/CppBenchmark.git master
CppCommon CppCommon https://github.com/chronoxor/CppCommon.git master
CppLogging CppLogging https://github.com/chronoxor/CppLogging.git master
# Modules
Catch2 modules/Catch2 https://github.com/catchorg/Catch2.git master
cpp-optparse modules/cpp-optparse https://github.com/weisslj/cpp-optparse.git master
fmt modules/fmt https://github.com/fmtlib/fmt.git master
HdrHistogram modules/HdrHistogram https://github.com/HdrHistogram/HdrHistogram_c.git master
zlib modules/zlib https://github.com/madler/zlib.git master
# Scripts
build scripts/build https://github.com/chronoxor/CppBuildScripts.git master
cmake scripts/cmake https://github.com/chronoxor/CppCMakeScripts.git master
Each line describe git link in the following format:
- Unique name of the repository
- Relative path of the repository (started from the path of .gitlinks file)
- Git repository which will be used in git clone command
- Repository branch to checkout
Empty line or line started with # are not parsed (treated as comment).
Finally you have to update your root sample repository:
# Clone and link all git links dependencies from .gitlinks file
gil clone
gil link
# The same result with a single command
gil update
As the result you'll clone all required projects and link them to each other in a proper way.
If you want to commit all changes in some repository with all changes in child linked repositories you can do it with a single command:
gil commit -a -m "Some big update"
Pull, push commands works in a similar way:
gil pull
gil push
Gil (git links) tool supports the following commands:
usage: gil command arguments
Supported commands:
help - show this help
context - command will show the current git link context of the current directory
clone - clone all repositories that are missed in the current context
link - link all repositories that are missed in the current context
update - clone and link in a single operation
pull - pull all repositories in the current directory
push - push all repositories in the current directory
commit - commit all repositories in the current directory
More about git recursive submodules dependency problem.
add a comment |
I just have a solution for your problem - gil (git links) tool
It allows to describe and manage complex git repositories dependencies.
Also it provides a solution to the git recursive submodules dependency problem.
Consider you have the following project dependencies:
sample git repository dependency graph
Then you can define .gitlinks file with repositories relation description:
# Projects
CppBenchmark CppBenchmark https://github.com/chronoxor/CppBenchmark.git master
CppCommon CppCommon https://github.com/chronoxor/CppCommon.git master
CppLogging CppLogging https://github.com/chronoxor/CppLogging.git master
# Modules
Catch2 modules/Catch2 https://github.com/catchorg/Catch2.git master
cpp-optparse modules/cpp-optparse https://github.com/weisslj/cpp-optparse.git master
fmt modules/fmt https://github.com/fmtlib/fmt.git master
HdrHistogram modules/HdrHistogram https://github.com/HdrHistogram/HdrHistogram_c.git master
zlib modules/zlib https://github.com/madler/zlib.git master
# Scripts
build scripts/build https://github.com/chronoxor/CppBuildScripts.git master
cmake scripts/cmake https://github.com/chronoxor/CppCMakeScripts.git master
Each line describe git link in the following format:
- Unique name of the repository
- Relative path of the repository (started from the path of .gitlinks file)
- Git repository which will be used in git clone command
- Repository branch to checkout
Empty line or line started with # are not parsed (treated as comment).
Finally you have to update your root sample repository:
# Clone and link all git links dependencies from .gitlinks file
gil clone
gil link
# The same result with a single command
gil update
As the result you'll clone all required projects and link them to each other in a proper way.
If you want to commit all changes in some repository with all changes in child linked repositories you can do it with a single command:
gil commit -a -m "Some big update"
Pull, push commands works in a similar way:
gil pull
gil push
Gil (git links) tool supports the following commands:
usage: gil command arguments
Supported commands:
help - show this help
context - command will show the current git link context of the current directory
clone - clone all repositories that are missed in the current context
link - link all repositories that are missed in the current context
update - clone and link in a single operation
pull - pull all repositories in the current directory
push - push all repositories in the current directory
commit - commit all repositories in the current directory
More about git recursive submodules dependency problem.
add a comment |
I just have a solution for your problem - gil (git links) tool
It allows to describe and manage complex git repositories dependencies.
Also it provides a solution to the git recursive submodules dependency problem.
Consider you have the following project dependencies:
sample git repository dependency graph
Then you can define .gitlinks file with repositories relation description:
# Projects
CppBenchmark CppBenchmark https://github.com/chronoxor/CppBenchmark.git master
CppCommon CppCommon https://github.com/chronoxor/CppCommon.git master
CppLogging CppLogging https://github.com/chronoxor/CppLogging.git master
# Modules
Catch2 modules/Catch2 https://github.com/catchorg/Catch2.git master
cpp-optparse modules/cpp-optparse https://github.com/weisslj/cpp-optparse.git master
fmt modules/fmt https://github.com/fmtlib/fmt.git master
HdrHistogram modules/HdrHistogram https://github.com/HdrHistogram/HdrHistogram_c.git master
zlib modules/zlib https://github.com/madler/zlib.git master
# Scripts
build scripts/build https://github.com/chronoxor/CppBuildScripts.git master
cmake scripts/cmake https://github.com/chronoxor/CppCMakeScripts.git master
Each line describe git link in the following format:
- Unique name of the repository
- Relative path of the repository (started from the path of .gitlinks file)
- Git repository which will be used in git clone command
- Repository branch to checkout
Empty line or line started with # are not parsed (treated as comment).
Finally you have to update your root sample repository:
# Clone and link all git links dependencies from .gitlinks file
gil clone
gil link
# The same result with a single command
gil update
As the result you'll clone all required projects and link them to each other in a proper way.
If you want to commit all changes in some repository with all changes in child linked repositories you can do it with a single command:
gil commit -a -m "Some big update"
Pull, push commands works in a similar way:
gil pull
gil push
Gil (git links) tool supports the following commands:
usage: gil command arguments
Supported commands:
help - show this help
context - command will show the current git link context of the current directory
clone - clone all repositories that are missed in the current context
link - link all repositories that are missed in the current context
update - clone and link in a single operation
pull - pull all repositories in the current directory
push - push all repositories in the current directory
commit - commit all repositories in the current directory
More about git recursive submodules dependency problem.
I just have a solution for your problem - gil (git links) tool
It allows to describe and manage complex git repositories dependencies.
Also it provides a solution to the git recursive submodules dependency problem.
Consider you have the following project dependencies:
sample git repository dependency graph
Then you can define .gitlinks file with repositories relation description:
# Projects
CppBenchmark CppBenchmark https://github.com/chronoxor/CppBenchmark.git master
CppCommon CppCommon https://github.com/chronoxor/CppCommon.git master
CppLogging CppLogging https://github.com/chronoxor/CppLogging.git master
# Modules
Catch2 modules/Catch2 https://github.com/catchorg/Catch2.git master
cpp-optparse modules/cpp-optparse https://github.com/weisslj/cpp-optparse.git master
fmt modules/fmt https://github.com/fmtlib/fmt.git master
HdrHistogram modules/HdrHistogram https://github.com/HdrHistogram/HdrHistogram_c.git master
zlib modules/zlib https://github.com/madler/zlib.git master
# Scripts
build scripts/build https://github.com/chronoxor/CppBuildScripts.git master
cmake scripts/cmake https://github.com/chronoxor/CppCMakeScripts.git master
Each line describe git link in the following format:
- Unique name of the repository
- Relative path of the repository (started from the path of .gitlinks file)
- Git repository which will be used in git clone command
- Repository branch to checkout
Empty line or line started with # are not parsed (treated as comment).
Finally you have to update your root sample repository:
# Clone and link all git links dependencies from .gitlinks file
gil clone
gil link
# The same result with a single command
gil update
As the result you'll clone all required projects and link them to each other in a proper way.
If you want to commit all changes in some repository with all changes in child linked repositories you can do it with a single command:
gil commit -a -m "Some big update"
Pull, push commands works in a similar way:
gil pull
gil push
Gil (git links) tool supports the following commands:
usage: gil command arguments
Supported commands:
help - show this help
context - command will show the current git link context of the current directory
clone - clone all repositories that are missed in the current context
link - link all repositories that are missed in the current context
update - clone and link in a single operation
pull - pull all repositories in the current directory
push - push all repositories in the current directory
commit - commit all repositories in the current directory
More about git recursive submodules dependency problem.
edited Jan 1 at 1:42
answered Dec 29 '18 at 15:11
chronoxorchronoxor
356115
356115
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53969893%2fhave-multiple-git-projects-in-one%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
We have no idea of what you mean by template or module. git doesn't know and care about what you store in a repo. You can store any kind of file you want, and create whatever branches you find useful to create. Don't confuse the sources, stored in git, and the artifacts that your build procedure creates, which are normally not stored in git.
– JB Nizet
Dec 29 '18 at 13:38
1
git submodules, The Book, git subtrees.
– phd
Dec 29 '18 at 14:25