kldeb / gulp-subtree-only

A Gulp module to push a given folder to a subtree

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gulp Subtree Only

A little gulp module to let you push a folder to a git subtree. This version differs from Snugug's original (thanks!). It only executes the git subtree command. Your distribution folder will need to be in the repository.

Requirements

git subtree must be previously installed. Older versions of git (e.g. Ubuntu 12.04's standard install version) are not bundled with it. The easiest way to check is to see if git subtree throws up or not. Gulp will fail silently if the command is not available. See here for more info on how to install it.

Usage

var subtree = require('gulp-subtree-only');

gulp.task('subtree', function () {
  return gulp.src('dist')
    .pipe(subtree());
});

Options

Options can be passed into subtree to choose the remote, branch, and message to push with. By default, it's origin, gh-pages, and 'Distribution Commit'.

var subtree = require('gulp-subtree-only');

gulp.task('subtree', function () {
  return gulp.src('dist')
    .pipe(subtree({
      remote: 'upstream',
      branch: 'master',
      message: 'Here We Go!'
    }));
});

About

A Gulp module to push a given folder to a subtree

License:MIT License


Languages

Language:JavaScript 100.0%