@sparkbox/commit-colors
v1.0.0
Published
See a lovely color swatch in your terminal every time you author a commit. The hexadecimal color comes from the first six characters in your commit hash.
Downloads
4
Readme
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-colors
Copy/paste the following text into a post-commit hook:
#!/bin/bash SHA=$(git rev-parse HEAD) SHA6=${SHA:0:6} commit-colors $SHA6
In other words, put the above code in a file named
post-commit
at the location.git/hooks/post-commit
in 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.
- ???