views:

49

answers:

2

I do freelance work from home - several websites based on Wordpress, OpenCart, other open source projects and sometimes some custom made CMS/ecommerce. I'm trying to get organized to have a local Source Code Control tool - to keep track of changes, etc. I've tried SVN - its ridiculously slow - I guess because of the number of small files for each project - hundreds or thousands... every time I'm adding a project to the repository is a nightmare...

Also, as most projects are based on open source projects, I would end up having a copy of those projects for each one of my projects - thou with different versions and then I guess this is ok...??!!??

What would be the best approach for me to get organized with my projects?

+4  A: 

Use git. It's faster than svn, but can also be used as a front-end to SVN repositories. The reason Git is fast is that it keeps your entire repository including all history locally. You can then push/pull to a centralized repository if you wish.

Branches are much more user-friendly, so you can keep the source code for open-source projects in a separate branch and merge upstream changes as necessary. What will happen is you'll do a three-way merge, creating a diff between the old and new versions of the open-source project from its branch, and applying those changes to your master branch containing your own code (this sounds complex but it's all done automatically). Or if the open-source project uses git or svn (which should cover most of them), you can clone directly from their repository and pull down changes.

If you're using the same customized versions of open-source projects among several of your own projects, you should probably place your customized version in its own repository and then reference it as a Submodule from your other projects.

bemace
So with your idea, lets say I would have a project based on Wordpress:"All my code (mainly the theme and some custom plugins plus the wp-config file) would be on one repository.The wordpress code itself I could clone direct from Wordpress repository for each new project...What do I need? Install GIT on my computer - Tortoise GIT? And thats it? Then I would be working locally and then only push to a hosted repository if want or need. This is the same approach as Mercurial right? As a DSCM tool?
Ronaldo Junior
Git and TortoiseGit should do it. Git is indeed similar to Mercurial, it doesn't require any special server setup or anything. I've had good luck with TortoiseGit. There are sometimes minor gotchas with setup, but those answers are here on SO if you run into them.
bemace
+1  A: 

Short answer => GIT

Long answer => Why GIT is awesome

Yasky