Experimental project

This is a sandbox project, which contains experimental code for developer use only.

Goal

  • Clean up Drupal core and make it more extensible, maintainable, and sustainable.

Organization

Development guidelines

  1. Branches
    • platform/[topic]-[issue]-[username]: Topic/feature branches under development per user.

      Each topic branch MUST be suffixed with your username at the end.

      It SHOULD contain the issue ID (before the username, to not break autocompletion).

      Based on the respective topic base branch, or the branch of another user.

    • platform/[topic]-[issue]-base: Upstream tracking 8.x branch of Drupal core for a particular topic/feature branch.

      Each topic branch MAY use a corresponding -base branch, so each topic branch can be diffed against its relative 8.x base.

      To create or update a base branch:

      git push platform 8.x:topic-issue-base
      
    • origin/*: Your regular upstream Drupal core branches.

    See all current branches and current status and updates.

  2. Always commit atomic changes

    Do not change X different things in a single commit. Commit early, commit often.

    Commit atomic change-sets. Touching 10 files for a particular change is OK. Touching 10 files for 2-10 different changes is absurd. Exception: Coding style, documentation, and comment clean-ups/fixes.

  3. Provide proper credit

    When applying a patch from someone else, attribute the author by using the --author option:

    git commit --author="sun <sun@54136.no-reply.drupal.org>"
    

    The Git attribution option is exposed on each user's profile page (example).

  4. Write proper commit messages

    Platform branches may be merged into Drupal core. Each commit message should make sense when being looked at in a partial context; e.g., when only looking at the file history of foo.module. Don't do this. Follow the general commit message guidelines as much as possible.

Developer setup

  1. Go to your existing Drupal 8 core checkout:
    $ cd /var/www/drupal8
    $ git remote show -v
    origin  http://git.drupal.org/project/drupal.git (fetch)
    origin  http://git.drupal.org/project/drupal.git (push)
    
  2. Add this sandbox as a new remote:
    $ git remote add platform [username]@git.drupal.org:sandbox/sun/1255586.git
    $ git remote show -v
    origin    http://git.drupal.org/project/drupal.git (fetch)
    origin    http://git.drupal.org/project/drupal.git (push)
    platform  [username]@git.drupal.org:sandbox/sun/1255586.git (fetch)
    platform  [username]@git.drupal.org:sandbox/sun/1255586.git (push)
    
    $ git fetch platform
    
    $ git branch -a
    * 8.x
      remotes/origin/8.x
      remotes/platform/8.x
      remotes/platform/platform-classloader
      ...
    
  3. Warning: With multiple remotes, always specify the branch to push.

    Otherwise, git push platform will push all local branches whose names appear with the same name in the remote, which means you can easily and unintentionally overwrite platform/8.x and other branches.

    Always use git push platform [branch].

Project information

  • Created by sun on , updated