How to keep Drupal up to date with the GitHub repo?

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

Being a newbie to Git and the DVCS world in general and not understanding how to use this repo as a method to maintain my Drupal core, I have the following questions:

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

    git clone git://github.com/drupal/drupal.git`
    git checkout DRUPAL-6-15
    
  • How to upgrade to the next version when it becomes available? git checkout DRUPAL-6-16Is it simple ?

  • How can I save my own changes (e.g. changes in .htaccess), and not revert back with every update?

  • What is the best way to add my modules and themes to my local Git repository and still be able to update the kernel whenever a new kernel release arrives? Do I need to create a branch?

+3
source share
2 answers

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

Yes. This is the right way.

How to upgrade to the next version when it becomes available? Just a git check of 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 save my own changes (e.g. changes in .htaccess), and not revert back with every update?

One way is to make all your changes in a separate branch and merge these changes after you have checked the release tag.

What is the best way to add my modules and themes to my local git repository and still be able to update the kernel whenever a new kernel version appears? Do I need to create a branch?

git submodule .

+4

drupal.org , , . , git.drupal.org.

0

Source: https://habr.com/ru/post/1732672/


All Articles