Skip to content

martin-heralecky/git-set-hash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

git-set-hash

Because every important commit deserves a cool hash.

Installation

make clean install

Example

$ git commit -m "my message"

$ git set-hash cafe0000
computing hashes on 16 threads...
found magic: 81rv1U
[cafe00002a5d3386f5fd09bf605d776579384990] my message

$ git show
commit cafe00002a5d3386f5fd09bf605d776579384990 (HEAD -> master)
Author: Martin Heralecký 
Date:   Thu Dec 22 19:56:48 2022 +0100

    my message

    magic: 81rv1U

Use Cases

"Linear" history.

* 00000003 delete file
* 00000002 change file
* 00000001 add file
* 00000000 initial commit

Versioning. No need for tags.

* 02005014 release version 2.5.14
* ...
* 02005013 release version 2.5.13

Indicating breaking changes (BC).

* bc000043 remove deprecated features

You can also use hashes to log time spent on each commit, reference an issue number from your issue tracker, keep track of when (date/time) the commit was made, or even play tic-tac-toe with your co-workers.