commit-colors

module
v0.0.0-...-4259828 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2021 License: MIT

README

Commit Colors Test Status

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 ID. Here's what it looks like:

animated gif demonstrating commit colors

For a live demo and some background on the project, watch this 5-minute lunch-and-learn video.

Commit colors is written in Go, and is usable on Mac, Windows, and Linux.

Note: this readme contains instructions for commit-colors 2.0+. commit-colors 1.0 was written in JavaScript and distributed on npm. For instructions on that version of the project, see the v1 README.

Installation

Via Homebrew

brew tap sparkbox/commit-colors
brew install commit-colors

Via Direct Download

  1. Browse to the list of releases, and download the package that corresponds to your system (Mac, Windows or Linux).
  2. Move the executable to a location on your PATH (like /usr/local/bin, for example).
· · ·

Once installed, you can do a quick test in the terminal:

commit-colors 123ADD5db8d67ba9621eb5d6765ffdef4c24077a

Commit Hooks Setup

Option 1: Create the hook by hand

Copy/paste the following text into a post-commit hook:

#!/bin/bash
commit-colors $(git rev-parse HEAD)

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 on all your repos, see how to do that here.

Option 2: Use a Git Hooks manager

See this list of tools for managing git hooks.

Whatever tool you use, this is the command you'll want it to run: commit-colors $(git rev-parse HEAD)

For Maintainers

Publishing
  1. Create a new tag, and push it up to Github:
git tag -a 2.0.0 -m "Version 2 release"
git push origin 2.0.0
  1. The Github Action handles the rest!

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL