views:

194

answers:

1

Drupal has a GitHub repository at http://github.com/drupal/drupal

I, being a newbie to Git and the DVCS world in general, and having trouble figuring out how to use this repo as a method for keeping my Drupal core up to date, so I have the following questions:

  • Is this the best way to check out a specific tag from the repo?

    git clone git://github.com/drupal/drupal.git`
    git checkout DRUPAL-6-15
    
  • How about updating to the next release when it becomes available? Just git checkout DRUPAL-6-16?

  • How can I choose to save my own changes (such as modifications to .htaccess) rather than revert back whenever I update?

  • What's the best way to add my modules and themes into my local git repo, and still retain the ability to update core whenever there's a new core release? Do I need to create a branch?

+4  A: 

Is this the best way to check out a specific tag from the repo?

Yes. It is the right way.

How about updating to the next release when it becomes available? Just git checkout DRUPAL-6-16?

git checkout master
git pull
git tag # Lists all tags, contains releases
git checkout <tagname> # tagname seen in the previous output.

How can I choose to save my own changes (such as modifications to .htaccess) rather than revert back whenever I update?

One way would be to make all your modifications in a separate branch and merge those changes after you have checked out a release tag.

What's the best way to add my modules and themes into my local git repo, and still retain the ability to update core whenever there's a new core release? Do I need to create a branch?

You should use git submodule for this. Checkout this answer

Lakshman Prasad
Thanks. So I have to switch back to master before I pull the latest changes? Is that always a rule?
Mike Crittenden