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
Post a Comment