Playful aliases for your gitconfig

• ~300 words • 1 minute read

Imposter syndrome has many forms. For me, one of its forms comes in feeling like I should have a more custom and clever library of dotfiles at this point in my career. A better "bag of tricks" as it were.

In particular, I have almost no git aliases. Not even a classic like git co. I guess I've never felt like saving keystrokes here and there—particularly in a world with autocompletion—is my biggest barrier to efficiency?

I actually have exactly one alias:

cb = "!git branch --show-current | pbcopy; echo 'Copied branch to clipboard: $(pbpaste)"

We used to have a workflow that required manually entering our branch names into Jenkins. I finally got tired enough of handling that manually and trying to remembe this arcane git command to get me just the part of the branch name I needed that I caved.

But this post is not about that, or the way I sometimes wield git with all the dexterity and cunning of a caveman using a MacBook as flint to start a fire. This is about a joyfully idle thought I had earlier today to make more playful aliases for git.

Behold, for your copy/paste convenience straight into ~/.gitconfig:

[alias]	  
	breakstuff = branch  
	yolo = "!git add -A && git commit -m 'YOLO!' && git push --force"  
	gimmedat = pull
	gimmedis = fetch
	blablahblah = commit
	squishes = merge
	thank = blame
	hm = log
	hmm = diff	
	grafitti = tag
	ghosts = commit --allow-empty -m "BOO!"
	yoink = clone
	hidemysnacks = stash	
	gimmesnacks = stash pop
	wheremysnacks = stash list
	doover = reset HEAD --hard	
	ohshit = "!git hidemysnacks && git doover"

If you have your own you'd like to contribute, please open a PR on my project over on GitHub: