Cloning git locally to test a Drupal module in development on multiple sites
Working on a site (DefinitiveDrupal.org) which is in its own big Git repository. But when working on a module that's custom to the site but probably will become generalized and contributed back, we simply git init in that module's directory to make it a repository too. No git submodules or other voodoo. In addition to getting us an independent commit history for that module, it gives us the ability to throw that module into other situations and work on it there.
Here we make a working copy of our module and repository from the Definitive Guide to Drupal 7 project (dgd7) in the Drupal 7 head checkout in which we're also testing patches involving input formats (if).
/workspace/if/sites/all/modules/dgd7_tip$ git clone ~/code/dgd7/drupal/sites/all/modules/custom/dgd7_tip/.git/ dgd7_tip
And now changes we make and commit in dgd7/drupal/sites/all/modules/custom/dgd7_tip can be pulled over in if/sites/all/modules/dgd7_tip.
Reference
http://www.kernel.org/pub/software/scm/git/docs/git-clone.html
http://www.kernel.org/pub/software/scm/git/docs/git-pull.html
Comments
Post new comment