git - 如何使 Drupal 与 GitHub 存储库保持同步?

标签 git drupal github dvcs

Drupal 的 GitHub 存储库位于 http://github.com/drupal/drupal

作为 Git 和 DVCS 世界的新手,我很难弄清楚如何使用这个 repo 作为使我的 Drupal 核心保持最新的方法,所以我有以下问题:

  • 这是从存储库中检查特定标签的最佳方式吗?

    git clone git://github.com/drupal/drupal.git`
    git checkout DRUPAL-6-15
    
  • 下一个版本可用时如何更新?只是git checkout DRUPAL-6-16

  • 我如何选择保存我自己的更改(例如对 .htaccess 的修改)而不是在我更新时恢复原状?

  • 将我的模块和主题添加到我的本地 git 存储库,并且仍然保留在有新核心版本时更新核心的能力的最佳方式是什么?我需要创建分支吗?

最佳答案

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

是的。这是正确的方法。

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?

一种方法是在单独的分支中进行所有修改,并在 checkout 发布标签后 merge 这些更改。

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?

你应该为此使用 git submodule。 checkout this answer

关于git - 如何使 Drupal 与 GitHub 存储库保持同步?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2258228/

相关文章:

javascript - Angular2.gitignore

git - 为给定域的 git push 指定 SSH key

android - EGit 忽略/Android

Drupal 7 查看以列出登录用户创建的内容

php - Drupal负载平衡

github - 在 Chef 中部署私有(private)存储库 : What am I doing wrong with my deploy key?

github - 通过API获取经过验证的组织的Github用户的电子邮件

linux - 编写一个 Makefile 以自动获取文件名并创建具有相同名称的相应可执行文件

django - 为新手制作带有图形数据库后端的基本网站的简单方法是什么?

Github 提交和拉取请求