Recently, I have begun to use Git as my source control for plugin development, and using github.com as a means to share my work with the community.
So, the dual-tool strategy begs the questions:
- Do they play nice together?
- How does a developer make them play nicely with one another?
The short answers to these questions is Yes. If you want the details, read on.
Given the Tidy code I am versioning using Git is not a full-blown application, I need it to reside within the context of a Rails application to test it. So this is what I did:
- Have my application, let's call it X, version controlled using Subversion
- In application X's vendor/plugins directory, I create a Git repository called tidy; this is where I maintain and test Tidy's code
- This Git repository is tied to github.com, so that I can push any changes out for the community to see
- The tidy directory is also version controlled by Subversion, so that my application has a working copy of Tidy that I can deploy
- However, Subversion complains about the tidy/.git directory, and Git in turn complains about the various tidy/*/.svn directories
- To remedy this, I added a tidy/.gitignore file to ignore the various tidy/*/.svn directories, and I added set the svn:ignore property on tidy/ to ignore the tidy/.git directory
With this setup, I can now more easily maintain the code for both my Rails application and the Tidy plugin.
No comments:
Post a Comment