git - Is it best practice to place Java project directly under the Source Code Repository -


any pros , cons or creating additional folders under repository ?

the example scenario below elaborates question further:-

e.g. using git scm.

option 1

myrepository/my-favorite-maven-project-1                     |____pom.xml              /my-favorite-maven-project-2                     |____pom.xml 

option 2

myrepository/somefolder1/my-favorite-maven-project-1                     |____pom.xml              /somefolder1/somefolder2/my-favorite-maven-project-2                     |____pom.xml 

i pros , cons option 1 , option 2.

putting multiple maven projects under single git repository makes sense if both of projects in fact modules of each other , released/branched @ same time.

it's mistake if you're moving svn you've had single large svn repo , lots of projects next each other though. reason is, svn branches/tags work @ folder level, in git work @ repository level. if you're branching/releasing project-1 , project-2 separately, should in separate git repositories.

the corollary there's little point in having top level folder somefolder1 because there's no reason you'd ever have somefolder2.


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -