Quantcast
Channel: drupal.org - Site administrators
Viewing all articles
Browse latest Browse all 426

Hands-on: Hook up with an GIT repository

$
0
0

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. Go to Configuration > Development > Version Control settings (url: /admin/config/development/versioncontrol-settings)
  4. Set "Git binary path". (Notice: Can be problems with Windows OS. On *nix OS there are no problems with path)
  5. Go to Content > VCS repositories > Add Git repository in the admin area. (url: /admin/content/versioncontrol-repositories/add-git)
  6. Repository name: "Test repo", or whatever.
  7. Repository root: "/path/to/repository/bare.git".
  8. 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)
  9. Save the repository.
  10. Enable the "Commit messages" menu entry, or go directly to the "/commitlog" path.
  11. The commit shows up there and the message log will be updated on every cron run.

Step 3: clone bare GIT repository

git clone /path/to/repository/bare.git testrepo
cd testrepo
git "test"> 1.txt
git add .
git commit -m "initial commit"
git push

visit "/commitlog" page and watch commits
The commit shows up there and the message log will be updated on every cron run.


Viewing all articles
Browse latest Browse all 426

Trending Articles