Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Having multiple eclipse project in one Github repository [closed]

I want to develop a multi-platform game using libGdx (for Desktop and Android).To share my work with some friends, I created a GitHub repository.

In ecplise, I have 3 different projects :

  • MyProject-core (most of the game)
  • MyProject-desktop (specific desktop code)
  • MyProject-android (specific android code)

I want to push them in my Github repository in 3 different folders. Basicaly, I want my repository to look like this :

MyRepository

  • /core/
  • /desktop/
  • /android/
  • README.md
  • LICENCE.md

My question is, Should I use 3 different local git repositories, or should I just use 1 large repo?

like image 420
Max Avatar asked May 02 '26 15:05

Max


1 Answers

It seems like you may want to use Git submodules.

You can have 1 main repo, with each of the other folders being a submodule, which is just a separate repo you pull down on checkout.

When pulling down your main repo you would do git submodule init which pulls down the other 3 repos/submodules.

The benefit of doing this instead of just having 1 repo with these 3 folders is that each repo with different codebases is essentially its own project, with its own language and set of issues.

like image 93
Beau Bouchard Avatar answered May 05 '26 03:05

Beau Bouchard



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!