Quantcast
Channel: Grant Winney
Viewing all articles
Browse latest Browse all 348

Don't (git) Blame Me!

$
0
0
Don't (git) Blame Me!

This sentiment on twitter cracked me up because I've thought the exact same thing! It's funny how git blame has an unusually negative connotation. Doesn't it seem to assume that if you're going through all the effort of finding out who wrote a line of code, then you must be trying to blame someone for something?

My mind didn't go to "thank" though... more like you're on a witch hunt. With that happy thought in mind, here are some other aliases for the more nefarious among us. ;)

[alias]
    huntdown = blame
    slipin = git commit --amend
    bulldoze = push --force
    blowup = reset --hard
    giveup = checkout .
    minenow = branch --move --force
    apologize = commit -am \"I am so SO sorry for this.\"
    deflect = commit -am \"Hey, I didn't ask for this...\"
    notme = !git add . && git commit -m \"It was NOT me!\" --author=\"$1\" && git push && :

In all seriousness though, many git commands have a --force option, but you should only use it if you know exactly what you're doing. Like using !important in css, --force pretty much steamrolls over the normal flow of things and takes precedence where it normally wouldn't.

If you want to learn more about git, here are a couple good tutorials and a sandbox site where you can try out various git commands:

I've also written about git (and GitHub) a few times - you might find something in here useful too!

Feel free to share your own goofy aliases below!


Viewing all articles
Browse latest Browse all 348

Trending Articles