hotoo / Gitplus
🔀 git+ is a hack of git, smart for you.
Stars: ✠57
Programming Languages
javascript
184084 projects - #8 most used programming language
git+
git+ is a hack of git, smart for you.
Feature
-
Execute commands before
git subcommand
executed,git commit
for example.pre-commit: '*': - jshint . - git status
-
Execute commands after
git subcommand
executed,git clone
for example.post-clone: 'gitlab.example.com': - git config user.name hotoo - git config user.email [email protected] - git config user.email
Install
$ npm install gitplus -g
Configure
~/.gitplusrc:
git-path: /usr/bin/git
post-clone:
gitlab.example.com:
- git config user.name lizzie
- git config user.email [email protected]
gitlab.company.com:
- git config user.name hotoo
- git config user.email [email protected]
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.com
and*
is a sample condition for filter git repository. -
git config user.name lizzie
is a sample command, this will execute aftergit subcommand
success and condition matched.
Usage
$ git config --global user.email
[email protected]
$ git clone [email protected]:test/repo.git test
$ cd test
$ git config user.email
[email protected]
$ git clone [email protected]:test/repo.git
$ cd repo
$ git config user.email
[email protected]
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].