Getting started with Git (for Drupal) on Windows

New to Git? Take a look at Introduction to Git.

Install Git on your local machine

Download Git for Windows. Follow the link Download for Windows.

Install using default settings only.

Add Git Bash to the Taskbar. Open Start menu and type git. Right-click Git Bash then click Pin this program to the taskbar. In taskbar, right-click Git Bash icon, then right-click Git Bash, then click Properties.

  • Shortcut tab: Set the Start in option to your local server's root directory (e.g c:\xampp\htdocs)
  • Options tab: set Buffer Size to 500 or something large (Buffer size is number of lines for scrollbar to go back), check Quick Edit checkbox.
  • Click OK to close Properties dialog.

Configure git user. Open your Drupal.org account, click Edit, then Git access. Copy Git user configuration and paste it into Git Bash. Lines should look like this:

git config --global user.name "Your Name"
git config --global user.email you@example.com
git config --global core.autocrlf true

Running imports and rollbacks from the UI via drush

As explained at Why you should run migrations in Drush rather than the UI, drush is a faster and more robust means of running large migration operations than the web-based UI is. As of Migrate 2.6, it is possible (with some advanced server-side configuration) to start migration operations from the UI that will run in the background via drush on the server.

Configuring background operations

To enable background imports and rollbacks requires some configuration on the server side. The key element is letting the Migrate module know where the drush command resides on the server, so it can be run. This is done by setting the Drupal migrate_drush_path variable to the full path of the drush command on the server, either in settings.php:

<?php
$conf
['migrate_drush_path'] = '/usr/bin/drush';
?>

or by setting the variable using drush:

$ drush vset migrate_drush_path /usr/bin/drush

On a windows server the path of the drush command has to include 'drush.bat', e.g. like C:\ProgramData\Drush\drush.bat.

Using Drush Rebuild

Drush Rebuild is a utility for rebuilding a local development environment from, for example, the production environment. Drush Rebuild uses Drush aliases and an easy-to-read YAML configuration file.

To use Rebuild you must know how to work with drush aliases.

Installation & configuration

Installation

Rebuild can be installed with drush or git.

Using drush: drush dl rebuild

Creating a Subtheme

@TODO

The placeholder page for Zurb Foundation 7.x documentation and will contain general information about creating subthemes.

  • Creating a subtheme
    • Manual
    • Drush

See:

http://drupal.org/node/1902848

Helpful Drush Commands

The Omega 4.x base theme comes with built-in Drush integration to extend the core commands of Drush itself for various Omega 4.x and theming related tasks.

Prerequisites

The following guide assumes that you already have Drush installed and running.

In previous versions, the Omega theme Drush integration was provided by a module (Omega Tools). However, the maintainers of Drush recently added command discovery for themes which now allows us to ship the Drush integration directly with the Omega theme instead of maintaining a separate module. Omega Tools has consequently been deprecated and will no longer be maintained for the 4.x version of Omega.

Please do not install Omega Tools when running Omega 4.x. It might overlap/collide with the Drush integration provided by the theme.

Getting started

Once you have Drush installed and working you can download Omega 4.x by navigating into your Drupal directory and issues the following command.

drush dl omega

This will automatically download and place Omega 4.x in sites/all/themes/omega.

Drush has an internal cache that you may have to clear in order to make use of the Omega related commands. The following command clears the internal Drush cache.

Using Drush to update to a specific version of core (not just the latest)

By default, the drush pm-update command will update Drupal core and all enabled to projects to the latest recommended releases. The optional project argument allows you to provide a list of installed projects to update, thereby limiting the scope of the update.

You can also pass a specific version of Drupal core as a project argument and Drush will limit the upgrade to that version of core (and core only, unless you pass other projects along as arguments.)

Example:

drush pm-update projects drupal-6.28

Pages

Subscribe with RSS Subscribe to RSS - drush