- beanmac
Hi all,
I am getting ready to store my drupal work on my svn repo, but I wanted to get an idea on what is being saved in SVN. My idea is to only save the sites directory which should have everything I have been working on (modules, themes, images, etc..).
Thanks,
- Bryant
Hi Bryant,
I don't think any of us has settled on a definitive strategy for this yet, but I've frequently done the following:
1. Create a new folder in subversion for your specific site. I typically do this both as a tag named something like my-site_prod-20080501 and also as a trunk version.
2. Copy the *entire* Drupal installation directory (don't forget the .htaccess file) into this folder
3. Edit the settings.php file to remove database connection info so that you're not storing passwords in the repository. I usually just reset it to the default Drupal install values.
4. Cleanup anything that may cause weirdness (remove any .svn folders from other checkouts, etc.)
5. Add the folder via svn add
6. Commit the site via svn commit
The reason I keep the entire site in Subversion is because it allows me to track everything I've changed in the site over a period of time. For example, when I update from core Drupal 5.5 to 5.7, I can see the changes easily with svn diff. The same can be said for contrib modules that are added to the site. This also gives you the ability to rollback to previous revisions of the site if you, for example, upgrade a module and *think* it works fine, but then later discover it's breaking something.
Hi Jeff,
Awesome feedback. I am currently only storing the sites directory, but I might change to include the drupal install as well. I am following 3 of the 6 items on the list currently, and I will look into apply all of these strategies to what we currently have.
Thanks,
- Bryant