git punish

The Missing Git Command

What is Cloudflare?



git punish is a shortcut for runnig git blame and posting it's output to to generate a snippet.


You can pull the code from site and place it in appropriate place by running following lines. You may need to run it with sudo.

> curl -o /usr/local/bin/git-punish
> chmod +x /usr/local/bin/git-punish

Alternatively if you feel uncomfortable sudo'ing or pulling anything from online you can make script manually.

> vi /usr/local/bin/git-punish

git blame --line-porcelain $@ | curl --data-binary @-

> chmod +x /usr/local/bin/git-punish


git punish takes all same parameters as git blame

> git clone [email protected]:yavorskiy/comment-parser.git
> cd comment-parser/
> git punish -L135,170 index.js

which outputs following:


Follow the view link to see example. Created snippet will expire in 24 hours and will be deleted, also you can delete it any time manually.

Please consider that you are creating public link.

Have fun, don't punish to hard :)