1.0.0 • Published 7 years ago
@sparkbox/commit-colors v1.0.0
Commit Colors
See a lovely color swatch in your terminal every time you author a commit. Here's what it looks like:

The hexadecimal color comes from the first six characters in your commit hash.
Installing
Install the package globally
npm install -g @sparkbox/commit-colorsCopy/paste the following text into a post-commit hook:
#!/bin/bash SHA=$(git rev-parse HEAD) SHA6=${SHA:0:6} commit-colors $SHA6In other words, put the above code in a file named
post-commitat the location.git/hooks/post-commitin your git project of choice. Make sure this file is executable. If you want this hook to run an all your repos, see how to do that here.
Todo
- Make it easier to install the commit hook.
 - Ensure it is cross-platform.
 - Support more color names.
 - ???
 
1.0.0
7 years ago