Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including gitprefix with all npm packages installed. Try it out:

var gitprefix = require("gitprefix")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

gitprefix v1.0.5


Gitprefix is a Git prepare-commit-msg hook for formatting Git commit messages.


  • Automatic task branch prefix (task/, epic/)
  • Emoji prefixing for certain words:
    • fix: 🔧
    • wip: 🚧
    • bug: 🐛
    • refactor: 🔨
    • revert: ⏪
    • pr: 👌
    • initial commit: 🎉
    • responsive: 📱
    • accessibility: ♿️



You need to have a git template directory set up. You can do this by creating an empty directory and adding this config to your ~/.gitconfig:

    templatedir = ~/path/to/your/git-template


This package is used as an installer for the formatter. To install you can run the following command:

npx gitprefix install

For new git repositories, the hook files wil be added automatically, however for existing projects you can run the following commands to reinitialise:

npx gitprefix init


If the package is ever updated you can run the following command to pull down the new formatter and overwrite the existing file:

npx gitprefix install --overwrite
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free