Hands-on: Hook up with an GIT repository

For git you need the "GIT backend" module.

Here is an example of using GIT backend:

Step 1: create an bare GIT repository (skip this if you already have one)

mkdir bare.git
cd bare.git
git init --bare

Step 2: set up your Drupal site with that repository

  1. Enable the "Version Control API", "Commit Log" and "GIT backend" modules.
  2. Flush cache.
  3. Assign role permissions for for "Administer version control systems"
    (by default nobody has any permissions)
  4. Go to Configuration > Development > Version Control settings (url: /admin/config/development/versioncontrol-settings)
  5. Set "Git binary path". (Notice: Can be problems with Windows OS. On *nix OS there are no problems with path)
  6. Go to Content > VCS repositories > Add Git repository in the admin area. (url: /admin/content/versioncontrol-repositories/add-git)
  7. Repository name: "Test repo", or whatever.
  8. Repository root: "/path/to/repository/bare.git".
  9. For other settings follow fields descriptions(and check "Web viewer URL handler" because by default it's not set. Might it'll be fixed in closest time)
  10. Save the repository.
  11. Enable the "Commit messages" menu entry, or go directly to the "/commitlog" path.

Linkified Git log messages for drupalcode.org and Issue queues.

A small shell function which linkifies git log output.
Modified from Ben Almans github version

  • drupalcode.org commit link
  • drupalcode.org blob links
  • drupal.org issue link if the commit message is formatted as Issue #123456

Example of linkified git log

Setting up Drupal Quickstart projects in Eclipse (with Git)

The Drupal Quickstart virtual machine ships with multiple code editors to edit project files such as PHP, CSS, HTML, and JS (JavaScript). The Eclipse IDE packaged with Quickstart requires some minor configuration to work a little more flawlessly with Git and Drupal projects nicely. Launch Quickstart and Eclipse then follow along.

Subscribe with RSS Subscribe to RSS - git