1.0.10 • Published 5 years ago

gulp-simple-git v1.0.10

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

gulp-simple-git

Install

npm install --save-dev gulp-simple-git

Use

Gulp Task

const gulp = require('gulp');
const simpleGit = require('gulp-simple-git');

const gitOptions = {
  remote: 'origin', //.........default => 'origin'
  branch: 'master', //.........default => {local working branch}
  addAll: true, //.............`git add .` :: default => false
  commit: true, //.............`git commit` :: default => false
  message: 'auto commit', //...`-m "message to commit"` :: default => [BRANCH: {currentBranch}] | [USER: {user}] | AUTO-COMMIT :: no message for commit.
  push: true, //...............`git push` :: default => false
};
// gulp task with passed options
const { gitTask } = simpleGit(gitOptions);

// gulp task without passed options
const { gitTask } = simpleGit();

// gulp task with options
gulp.task('auto-git-add-commit-and-push', gulp.series(gitTask));

Command line options

-R, --remote "origin" #.........default => 'origin'
-B, --branch "master" #.........default => {local working branch}
-a  #...........................`git add .` :: default => false
-c  #...........................`git commit` :: default => false
-m "message to commit" #........`-m "message to commit"` :: default => [BRANCH: {currentBranch}] | [USER: {user}] | AUTO-COMMIT :: no message for commit.
-p #............................`git push` :: default => false

In additional to the message flag ( -m ), optional auto-generated messages can be generated:

-s #...STABLE
-b #...BROKEN
-f #...FEATURE
-x #...HOTFIX
In Use
-sm #...[BRANCH: {currentBranch}] | [USER: {user}] | STABLE :: no message for commit.
-bm #...[BRANCH: {currentBranch}] | [USER: {user}] | BROKEN :: no message for commit.
-fm #...[BRANCH: {currentBranch}] | [USER: {user}] | FEATURE :: no message for commit.
-xm #...[BRANCH: {currentBranch}] | [USER: {user}] | HOTFIX :: no message for commit.

Options object

const gitOptions = {
  remote: 'origin', //.........default => 'origin'
  branch: 'master', //.........default => {local working branch}
  addAll: true, //.............`git add .` :: default => false
  commit: true, //.............`git commit` :: default => false
  message: 'auto commit', //...`-m "message to commit"` :: default => [BRANCH: {currentBranch}] | [USER: {user}] | AUTO-COMMIT :: no message for commit.
  push: true, //...............`git push` :: default => false
};

Git Info

const gulp = require('gulp');
const simpleGit = require('gulp-simple-git');

const { gitInfo } = simpleGit();

const {
  remotelyTrackedBranches, //...<object> with remote branches as key and an array of their respectively tracked branches
  currentWorkingBranch, //......<string> name of the current working branch
  remoteBranches, //............<array> of remote branches
  localBranches, //.............<array> of local branches
  user, //......................<string> git username
} = gitInfo;
1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.2.0

5 years ago

0.1.11

5 years ago

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago