2

I have a local git repository with two folders running on my windows machine. One of the folders has .net code, the other has php code.

What I'd like to do is have the php code stored on a Ubuntu installation I have running on VirtualBox and git would use that instead of the windows directory.

How would I go about setting that up? I tried to create a shortcut to the ubuntu folder but git didn't want to follow it.

playitcool
  • 97
  • 1
  • 6

1 Answers1

2

Ideally, you install git on your Ubuntu guest, and activate git daemon.
That will allow you to push your repo from the Windows host to your Ubuntu guest.

Then, one solution would be to plit your repo in two repos, that you can keep joined in one global repo through submodules.
That would allow you to push only the one with php content to your Ubuntu.

Or, simpler: you push everything, and have a post-receive hook deploying your php code where you need it.

Community
  • 1
  • 1
VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283
  • I definitely broke them up into two repos. Submodules looks like the way to go if i want to keep everything together with a "super" repo. Thanks for the answer Von. – playitcool Sep 21 '11 at 15:56