hardscrabble 🍫

By Max Jacobson

Psst. Check out my RubyConf 2017 talk, There are no rules in Ruby.

blog posts

my newest git alias is git

06 Sep 2014

Adding aliases makes git a lot more pleasant to use. For example, I am too busy to write git status to find out the current status of my project so I did this:

git config --global alias.st status

and now I just write git st.1

I have a few other git aliases that I find helpful. They’re on my dotfiles repo here: https://github.com/maxjacobson/dotfiles/blob/master/.gitconfig

I want to share my newest one because it’s kind of weird and fun. It solves a problem that others might have, but I apparently totally do: I often write git , don’t hit enter, and then go do something else. Then I come back and I write git st and hit enter, and I see this output:

⇥ git git st
git: 'git' is not a git command. See 'git --help'.

Did you mean one of these?
        hist
        init

I see this probably every day.2

I wanted a new alias that just kind of ignores the extraneous git. Most git aliases don’t behave that way. At first I tried aliasing git to nothing at all, but it didn’t let me. I landed on this:

git config --global alias.git "! git"

The exclamation mark character means this alias doesn’t refer to another git command; instead, I want to run an arbitrary bash command… which, in this case, happens to be git itself. Luckily, the git aliasing system doesn’t simply run the quoted bash command, but it passes the rest of the arguments along, so git git st now behaves the same as git st, not simply git.

I’m pretty happy with this. I have a nagging worry that it’s too weird to not have some unwanted side effects, and if I discover any I’ll update this post.

  1. btw: when you do that, it gets saved in a dotfile in your home directory called ~/.gitconfig. If you open that file you’ll see your name and email address too if you set that up (if not, check out GitHub’s page on that

  2. you might see different output, but hist is another of my aliases and it’s close enough to git that git thinks I meant it. 

onscreen texts and I'm so Happy I'm Ecstatic

20 Aug 2014

People have been linking to this terrific video by Tony Zhou about how film and television depicts onscreen text messaging:

(I saw it on Kottke which has some additional context)

The video brings up some memories for me, from when I wanted to make movies, and used a similar technique1. My short film “I’m so happy I’m Ecstatic” was uploaded to Vimeo in May 2010, just two months before Sherlock debuted on BBC.

Zhou isn’t the first to notice this trend. In April 2013, Rachel Dodes Whortman wrote an article about it for the Wall Street Journal (“From Talkies to Texties”). When I saw the article I felt the need to reply:

I think I’m less petulant now than the nerd who wrote that tweet2. I definitely don’t think I was the first to do that (Zhou’s video provides a few earlier examples, most embarrassingly 2008’s Sex Drive which I did totally see) and I definitely didn’t do it as elegantly as Sherlock.

But some small petty part of me wants to be in videos like that or to maybe keep making video things.

  1. I think I wrote it into the screenplay for the short, but I want to give credit to my friend Sarah Mayo who co-edited it with me and made it work – the few times I’ve seen people watch it, that’s their favorite part by far 

  2. (but then, I am writing this blog post)