Skip to content

tropf/localcommitment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Localcommitment

There are times you should create a couple hundred bytes long commit messages. And then there are times, you just need to get that commit going.

You can use Localcommitment for both cases, but it's recommended use is the latter.

This is an offline version of whatthecommit.com.

Usage

$ git status
[...]
Untracked files:
  (use "git add <file>..." to include in what will be committed)

	somefile
[...]
$ git add somefile
$ git status
[...]
Changes to be committed:
  (use "git rm --cached <file>..." to unstage)

	new file:   somefile
[...]
$ git gud
[master (root-commit) 0a819df] tl;dr
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 somefile

...or any other random message generated by the little helper program:

$ localcommitment
"Get that shit outta my master."
$ localcommitment
A long time ago, in a galaxy far far away...
$ localcommitment
It's getting hard to keep up with the crap I've trashed
$ localcommitment
Trying to fake a conflict
$ localcommitment
if you're not using et, fuck off
$ localcommitment
arrrggghhhhh fixed!

Installation

Requirements

cmake is required as a build tool, and you should have git installed. Bring your favourite C++11-compatible compiler (basically anything not 10 years old), only the standard library is used.

Note: The great incbin by graphitemaster is used, but it's basically as portable as the standard lib.

Debian/Ubuntu

sudo apt-get install build-essential cmake

ArchLinux

sudo pacman -S cmake
# essential build libraries provided by base-devel

Build & Install

Follow the default cmake path.

$ git clone https://github.com/tropf/localcommitment && cd localcommitment
$ mkdir build && cd build
$ cmake ..
$ make
$ sudo make install

Git alias

A git alias

$ git gud

is automatically installed.
It does:

  • get a random commit message
  • commit the current repository with this message

It does not:

  • add files
  • push a repository

Uninstall

From where you installed:

$ sudo make uninstall

Or do it manually:

  1. remove the git alias:
    $ sudo git config --system --unset alias.gud
  2. remove the binary for generating commitmessages
    $ sudo rm $(wich localcommitment)

Add Your Own Commitmessages

The list of all commitmessages is pulled from the file extern/commit_messages.txt. Just append some lines or swap the entire file!

Used Programs

Credit

C++ implementation:

Commitmessages: mainly ngerakines, and a lot of other contributors

Bugs

This thing probably breakes down on emojis. If you manage to do that, github issues and pull requests are welcome.

Github

Find this project on Github.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published