Drupal 模块 master 主分支中的 README.txt 文件示例

  向 drupal.org 社区提交模块时,通常会将代码放在分支上进行开发,而对于主分支 master,则习惯只在其下保留一个 README.txt 文件,这个 README.txt 文件中包含各个版本的模块的代码和位置,用于帮助人们找到合适的版本。

  以下是一个 master 主分支中的 README.txt 文件的样本,感谢 drupal.org 社区的 ELC 提供:

+ Where is the module?                                                   +

Since branching to support D6 and D7, the master branch that you are looking at has been cleared of content to avoid old code being used.

If you did a full git clone, then you should have all the code hidden away in two additional branches:

- 6.x-1.x
- 7.x.1.x

While "git branch" will only show locally tracked branches, in this case master, the other branches are hidden in the .git repository.

Running "git branch -a" will show something like this:
* master
  remotes/origin/HEAD -> origin/master

To checkout one of those branches so you can use the code, type:
git checkout -b 7.x-1.x remotes/origin/7.x-1.x

This created a local tracking branch called 7.x-1.x which tracks the remote remotes/origin/7.x-1.x branch. You will also now have all the files to use the git version of the module.

Have fun!