tags:

views:

128

answers:

2

At the moment I am using SVN for my projects, with a folder structure like so:

 /trunk
    /design
    /flash
    /resources
    /scrap
    /www

I keep all of the website source files (psds, etc) inside the design folder, which adds up to few hundred MB or more. I do this because I am usually the only developer on a project and I regularly switch between two workstations and always want up-to-date resources. I generally never use branching (with SVN).

When I deploy to a webserver I checkout /trunk/www/, which contains just the website code and any compiled swfs (.fla and .as source files are kept inside /trunk/flash).

I am in the process of moving to Git and this structure feels wrong to me, mainly because:

  1. I don't want to transfer all of my resources to the webserver during deployment.
  2. I generally don't ever want to branch binary files, and don't want to have to deal with potential conflicts because of this.

Any suggestions on what I can do, or some insight on what has worked for you?

UPDATE

I have decided to go the submodule route, with www being the submodule and everything else in the parent repository. Until git supports partial checkouts I think this is my best option whilst staying sane.

+1  A: 

I handle binaries in git with rules in my .gitignore-file.

Means: I ignore all binaries, so they are not committed and build them only to test or deploy. Saves bandwidth (ok, that's not so important) and keeps the number of versions to code-changes only.

UPDATE:

kind of convinced: Using a second repository is also a solution. And you can use git-submodule to integrate it into your code-repository. Another discussion on stackoverflow already discussed this topic: Managing large binary files with git.

HTH, flokra

flokra
Unfortunately this won't solve my need to keep the binaries sync'ed between workstations.
iFunk
then you might want to get into using branches, one code-only and one code and binaries. There are a lot of howtos out there (for example: http://www.neeraj.name/blog/articles/789-how-to-use-branch-feature-of-git-and-work-with-github).
flokra
Thanks for your help, this was what I was leaning to in the first instance but wasn't sure what other people thought about it. Cheers!
iFunk
+4  A: 

How about using a separate repo for the binary files, or the www directory.

sylvanaar
That's what I'm leaning towards at the moment. I was considering something with submodules but wanted to hear others suggestions.
iFunk