Author Topic: Source control inside of source control  (Read 1203 times)

micah

  • A man on the Internet.
  • Jackass In Charge
  • Posts: 6479
  • Karma: +55/-55
  • Good man. Nixon's pro-war and pro-family.
    • micahj.com
Source control inside of source control
« on: July 30, 2014, 12:03:01 PM »
This is an SVN and/or GIT question.

I have several projects that I use git to manage that are hosted on my website.  eg  domain.com/code/project1 or domain.com/code/project2 each being its own repository.

I now want to manage my entire site (domain.com) with git as well but it already includes a bunch of repositories.  Any ideas on best practice for this?  Should I just ad an ignore command for the existing repositories?

"I possess a device, in my pocket, that is capable of accessing the entirety of information known to man.  I use it to look at pictures of cats and get in arguments with strangers."

Mike

  • Ass Wipe
  • Posts: 11928
  • Karma: +168/-32
  • Ex Asshole - a better and more caring person.
Re: Source control inside of source control
« Reply #1 on: July 30, 2014, 01:19:32 PM »
With git you can add submodules.  So each project has a repo and then the domain has a repo with each project as a submodule.

micah

  • A man on the Internet.
  • Jackass In Charge
  • Posts: 6479
  • Karma: +55/-55
  • Good man. Nixon's pro-war and pro-family.
    • micahj.com
Re: Source control inside of source control
« Reply #2 on: July 31, 2014, 08:59:38 AM »
oh nice! I'll start googling the best way to do that. Thanks!

"I possess a device, in my pocket, that is capable of accessing the entirety of information known to man.  I use it to look at pictures of cats and get in arguments with strangers."

tgm

  • Guitar Addict
  • Jackass In Charge
  • Posts: 3642
  • Karma: +46/-18
Re: Source control inside of source control
« Reply #3 on: July 31, 2014, 10:27:59 AM »
I'm not a huge fan of submodules in git. Depending on how you use them you can really mess up your repository. If they aren't changing all of the time and don't have any cross dependencies that's usually OK, but if you're changing them frequently (at the same time) managing the versions in the parent can be a pain.

I might actually prefer to keep things in separate projects and simply use a build tool to package them together.
This signature intentionally left blank.

Mike

  • Ass Wipe
  • Posts: 11928
  • Karma: +168/-32
  • Ex Asshole - a better and more caring person.
Re: Source control inside of source control
« Reply #4 on: August 02, 2014, 03:54:21 PM »
Random idea: look to see if you can't make the individual repos composer dependencies of the big repo

micah

  • A man on the Internet.
  • Jackass In Charge
  • Posts: 6479
  • Karma: +55/-55
  • Good man. Nixon's pro-war and pro-family.
    • micahj.com
Re: Source control inside of source control
« Reply #5 on: June 09, 2015, 01:40:10 PM »
Ok, revisiting this question, but in a different context.

I used git to install something off github. Now I want to create a plugin for it which should have its own repository.  I don't want to fork the whole project but the code for my plugin is living inside the bigger project.  What's the best practice for this?
 

"I possess a device, in my pocket, that is capable of accessing the entirety of information known to man.  I use it to look at pictures of cats and get in arguments with strangers."

tgm

  • Guitar Addict
  • Jackass In Charge
  • Posts: 3642
  • Karma: +46/-18
Re: Source control inside of source control
« Reply #6 on: June 09, 2015, 09:02:03 PM »
submodule or symlink, although forking is really not that big of a deal.
This signature intentionally left blank.