1.1.4 • Published 11 years ago
gitplus v1.1.4
git+
git+ is a hack of git, smart for you.
Feature
Execute commands before
git subcommandexecuted,git commitfor example.pre-commit: '*': - jshint . - git statusExecute commands after
git subcommandexecuted,git clonefor example.post-clone: 'gitlab.example.com': - git config user.name hotoo - git config user.email hotoo@example.com - git config user.email
Install
$ npm install gitplus -gConfigure
~/.gitplusrc:
git-path: /usr/bin/git
post-clone:
gitlab.example.com:
- git config user.name lizzie
- git config user.email lizzie@example.com
gitlab.company.com:
- git config user.name hotoo
- git config user.email hotoo@company.com
pre-commit:
'*':
- jshint .~/.zshrc or ~/.bashrc
alias git='gitplus'git-path: optional, set you origin git command via absoulte path, default is/usr/bin/git.pre-subcommand: hooks for execute commands beforegit subcommand.post-subcommand: hooks for execute commands aftergit subcommand.gitlab.example.com,gitlab.company.comand*is a sample condition for filter git repository.git config user.name lizzieis a sample command, this will execute aftergit subcommandsuccess and condition matched.
Usage
$ git config --global user.email
hotoo.cn@gmail.com
$ git clone git@gitlab.example.com:test/repo.git test
$ cd test
$ git config user.email
lizzie@example.com
$ git clone git@gitlab.company.com:test/repo.git
$ cd repo
$ git config user.email
hotoo@company.com