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.
$ 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!
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
Follow the default cmake path.
$ git clone https://github.com/tropf/localcommitment && cd localcommitment
$ mkdir build && cd build
$ cmake ..
$ make
$ sudo make install
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
From where you installed:
$ sudo make uninstall
Or do it manually:
- remove the git alias:
$ sudo git config --system --unset alias.gud
- remove the binary for generating commitmessages
$ sudo rm $(wich localcommitment)
The list of all commitmessages is pulled from the file extern/commit_messages.txt
. Just append some lines or swap the entire file!
C++ implementation:
- Rolf Pfeffertal [email protected]
Commitmessages: mainly ngerakines, and a lot of other contributors
This thing probably breakes down on emojis. If you manage to do that, github issues and pull requests are welcome.
Find this project on Github.