i started to learn git, created a git repo in a svn way (many projects per repo) and started do develop the project
x/
+--.git/
+--y/
|--pom.xml
+--rest of java files and folders
so actually root of my java project is y but root of git repo is x. eclipse handles it really nicely allowing you to specify ‘working directory’/’path’ inside the repo that becomes root of your project
but when i tried to integrate it with jenkins i realised that git way is ‘one repo per project’ and i can’t provide such ‘working directory’ in jenkins.
my question is: what for eclipse introduced the concept of ‘working directory’/’path’ if it’s incompatible with rest of the world? when should i use it?
i’m sure i’m missing something, but don’t know what
“many projects per repo” is called submodules in git world.
Limiting each repo to one project is better (and more compatible with other frameworks expectations, like Jenkins), but a git repo can reference many other repos through submodules.
The working directory is by default x, but could be any other path if you want to separate the actualt repo
x/.gitfrom the working directory (you could want to be elsewhere)