Socket
Book a DemoInstallSign in
Socket

@sparkbox/commit-colors

Package Overview
Dependencies
Maintainers
9
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sparkbox/commit-colors

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.

1.0.0
latest
Source
npmnpm
Version published
Weekly downloads
1
Maintainers
9
Weekly downloads
 
Created
Source

Commit Colors

See a lovely color swatch in your terminal every time you author a commit. Here's what it looks like:

animated gif demonstrating commit colors

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.
  • ???

FAQs

Package last updated on 15 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.