migrate sites from CVS to GIT

Events happening in the community are now at Drupal community events on www.drupal.org.
karlre1's picture

git has replaced cvs as the version control system for drupal. -

There is a number of articles on to how handle git
but they don't really address the needs of site maintainers.
I am aware that this is a developers' group but since I found no better place to turn to...
... let me git it a try, anyway.

I have found no article specifically dealing with the needs of drupal admins
when having to MOVE FROM CVS TO GIT ON PRODUCTIVE SITES.

Let me ask a couple of questions as a site admin on Linux systems
on what to do in order to successfully move to git.

--> Actually I am going to tell you how I used to do things via cvs
hoping to get hands-on tips on how to do them via git.

1.0 Install specific module version via cvs [e.g. "captcha"]
I used to:
cd /var/www/drupal/sites/all/modules
sudo cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contribcheckout -r DRUPAL-6--1-8-BETA4 -d captcha contributions/modules/captcha

1.1 Install specific module version via git
--> ???

2.0 Display available module updates in drupal
I used to:
do this via cvs_deploy
I understand that "cvs_deploy" is now replaced by "git_deploy"
which still comes in a development version and has very low usage statistics (81).
--> is it reliable enough to run on productive sites??

2.1 Update modules to specific module version via cvs [e.g. "captcha"]
cd /var/www/drupal/sites/all/modules/captcha
cvs update -r DRUPAL-6--2-0-BETA4 -dP

2.1.1 updating modules to specific module version via git
--> ???

3.0 update drupal to a specific version via cvs [e.g. "DRUPAL-6-20"]
sudo su
cd
--> I used to run a mini-script which looks like:
cd /var/www/drupal; cvs -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal update -r DRUPAL-6-20 -dP

3.1 updating drupal to a specific version via git
--> ???

Many thanks for helping me out on this!

charles

Comments

There is Documentation for that

dipen chaudhary's picture

Hey,

Many of your questions are answered in drupal documentation - http://drupal.org/node/803746
Also checkout this discussion, its rather long but worth reading - http://groups.drupal.org/node/140949

Cheers


Dipen Chaudhary
Founder, QED42 http://www.qed42.com Drupal development

How I solved this

karlre1's picture

I thought I might share how I finally solved this. -

First of all: Git isn't the first choice to install or update drupal or its modules. - It's drush.

@1.1 Install specific module via drush
drush dl module_name
(enable module via: drush en -y module_name --uri=example.com)

@2.0 Display available module updates via drush
drush pm-list -no-core --pipe --type="module"

@2.1.1 Update module to specific version (i.e. security updates)
--> I usually don't update single modules anymore. Instead I do several updates in a roll:
drush pm-update --security-only --uri=example.com

@3.1 Update drupal core via drush
drush up drupal

I did a lot of research and reading before I was ready to adopt another method of site administration.
A particularly useful source for questions around git and drush was the following book: The definitive Guide to Drupal 7.
An overview of drush commands is at drush.ws

Big thanx to the drupal community on this occasion.

charles

Drupal And Git

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: