Reputation: 610
I have a public repository on Github. In this repository I am sharing single file java applications structured as follows:
Root
Folder1
JavaApp1.java
JavaApp2.java
Folder2
JavaApp3.java
In the other hand I am compiling these java applications within IntellijIdea. The problem is, I don't want to share *.iml
files etc. in my public repository because I want to keep the repository as simple as possible.
In the other hand I want to store *.iml
files etc. in Github for my own need. What can I achieve this requirement with Git?
Upvotes: 3
Views: 3540
Reputation: 1323125
You would need two repos:
iml
filesThat way, you only clone you first private repo (and get your Root folder), and that will clone the submodule as well (in a "src" subfolder for instance)
cd /my/private/repo
git submodule add -- /url/public/repo src
Upvotes: 2