Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I've currently been creating my Git repositories at the root level for each of my WordPress installations. Git of course then notices any core updates, plugins, and uploads. I'm considering just tracking the theme I'm working on or perhaps the entire themes directory.

I'd like to hear from other WordPress developers as to what are their preferred version control practices.

share|improve this question

2 Answers 2

up vote 4 down vote accepted

If I'm working on whole project for a client (WP install + custom theme + plugins), I put everything in one repository. My thinking is that I created one "solution" based on WP + some existing plugins + my added code, and thus I should track it as one solution. When WP or a plugin is updated I need to test it on a dev and/or staging environment anyway, so it's better to know the version control status of the whole project.

If I'm working on one plugin, I put it outside the WP directory and use symlinks from multiple installations to simplify testing. The repository is then only the plugin. The only problem there is that __FILE__ won't work, so I work with a define() to simulate my path.

share|improve this answer
    
Thanks for your answer Jan. This was the direction I was leaning as well, especially since so many of the themes I develop for clients rely on specific plugins. –  manifestphil Jan 13 '11 at 18:44
    
Over time I'd like to reiterate that I think this is still the best way to go. Sure it's a little bit bulky when updating WP core and plugins, but important when working in a distributed team. –  manifestphil May 20 '12 at 18:13

I’m using one Git repository per project: One for each theme, plugin, importer etc. If you don’t want so many projects, use gitignore to avoid the tracking of native WP files.

share|improve this answer
1  
Toscho, based on your advice, I went hunting for a .gitignore template. I'm basing it off of: gist.github.com/444295 –  manifestphil Jan 13 '11 at 19:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.