git-alert v0.0.6
Git Alert
Broadcast important messages alongside your commits, so that the others
could see them on git pull
.
git-alert
is a command-line utility written in Node.
Installation
Install
git-alert
globally via npm:npm install -g git-alert
Install
post-merge
hook in your repository:git alert install
You're done! Read on.
Summary
git alert install
— installs post-merge
hook that displays pending messages
after you git pull
in your repository
git alert 'My important message'
— adds specified message
git alert rm e3bfac
— removes specified message (yeap, each message has its hash,
like commits)
git alert show
— shows pending (unread) messages, marking them as read
git alert list
— lists all messages from .gitalert
file (where they
are actually stored)
How it works?
You and your team members install
git-alert
and hooks for the repository.You add a message via
git alert 'My important message'
and commit your changes.Other team members do
git pull
and see'My important message'
.
Did I mention some details?
The list of messages is stored in
.gitalert
file in your repository. Note, you should actually commit this file so that the others could receive it.The list of read messages is stored locally in
.git
directory.When you no longer need a message, you can remove it: first locate it and its hash with
git alert list
, then remove it withgit alert rm <hash>
.It is a good practice to keep an entire list of messages small.
.gitalert
is actually a human-readable JSON file, so you can edit it by hand and even merge conflicts.In case you miss messages (e.g. when automatic merge fails
post-merge
hooks are not executed) you can always read them manually viagit alert show
.
Bonus: auto-install hook in Node.js
Just add git-alert
to your devDependencies
and the hook will be installed
via npm i
.
License
ISC / Boris Okunskiy