gitp
v0.1.1
Published
A git proxy (or decorator (if you will)) that allowes doing custom work for git commands before sending the commands to git. Only command affected right now is the `commit` command.
Downloads
5
Maintainers
Readme
gitp
A git proxy/(decoratorish) module for prefixing your commit messages with the story id from your branch name.
Installation:
- First:
npm install -g gitp
- Then (from your projects root directory):
npm install gitp
Usage:
gitp commit -a -m "Some commit message here."
For example branch 'b07898-hello-world-feature' the following call will produce commit message "B-07898 - Some commit message here.":
gitp commit -a -m "Some commit message here."
And for branch 'd08432-some-defect-fix-branch' the following message will be produced: "D-08432 - Some commit message here."
Note All git commit
flags supported except --
followed by files (-- <files>
). For this scenario use
git add
first then after adding your files use gitp commit <flags>
.
The story id format is hard-coded in the code but can be changed to live in a config file later.
The story id format expected in the branch name is: /^[a-z](\-|_)?\d+/i
; E.g., b01234-hello_world_branch or d1984-fix-for-some-defect
Resources:
git help commit
- http://git-scm.com/docs/git-commit
- http://stackoverflow.com/questions/1417957/show-just-the-current-branch-in-git
License:
- MIT License (http://opensource.org/licenses/MIT)