views:

117

answers:

1

Hi All,

I am trying to figure out a git workflow. At the moment we have a httpdocs directory with the old legacy live site, which we don't want to be part of a git repo. I have been building a newer mobile platform that runs sperate to the main site. The source code is within parent/src and parent/httpdocs/md. My permissions don't allow me to create a git repository in the parent folder.

I have tried to create another folder in the parent for example parent/repo, create a git repo in that and then add the correct sub folder to that repo (parent/src and parent/httpdocs/md), but git doesn't allow you to add subfolders that are not a child of the git repo.

Is there a way around this or a solution for my git workflow that anyone can think of. I am new to git and not too sure of the possibilities.

Thanks

A: 

How about moving the parent/httpdocs/md stuff into parent/src and then creating a parent/httpdocs/md symlink which points to the new location. Then you could create your repository in parent/src.

In any case, it would be a good idea to separate the files which are live on the website from the working dir of the repository, where you make changes.

robinst
Thanks that should work I can have parent/application containing the two sub folders application/src and application/md. Then within the httpdocs create a symlink as you suggest at parent/httpdocs/md to match to parent/application/md keeping my source code out of the public directory and keeping everything in git.In terms of keeps the working directory separate I am going to create a bare git repo to push changes to that will be copied into the live git repo on post-commit http://joemaller.com/2008/11/25/a-web-focused-git-workflow/ thanks for your help!
Gcoop