Attach images to Github issues with Skitch

I just found a decent solution to something I’ve wanted for a while: the ability to place an image in a Github issue’s description or comment. Here’s the final result.

The actual issue, live on Github.

I’ve got it down to one extra click and keypress:

  1. Take a screenshot using Skitch.
  2. Share it.
  3. Paste the URL from the clipboard.

The trick is Skitch’s flexible “Share” configuration options

I created a free Skitch account and configured sharing to automatically put a “Fullsize image link” on the Mac’s clipboard after the sharing is complete:

It looks like this will work with any of the supported account types. E.g., Webdev and SFTP are both possible and are what I’ll move to eventually so that I have all my images on my own server. But right now, Skitch’s free hosting is fine for me.

Here are some screenshots of the rest of the process, once the sharing is set up. First, immediately after clicking “Share”, there’s a loading progress indicator. Apparently, you have to wait for this to finish.

Then, when done, a superflous Share dialog popup appears, but you can ignore it because we’ve configured Skitch to automatically copy the link to the clipboard:

Finally, just move over to your Github issue and press ⌘V to paste the auto-copied URL:

And that’s it. Pretty sweet.

PS: Some links I found while looking for a solution

My Problem with Git: No Abstraction

Git is powerful, and Github is its killer app. I use them for all my projects. That being said,

Git is more difficult than it ought to be, but until now I couldn’t put my finger on why

I was doing some mundane Linux command line work when I had my flash of insight. I’ve been using Linux for years, but I almost made a typical newbie mistake with the mv command. I wanted to rename a file:

mv /path/to/old_name new_name

Urp! I stopped, because this would not have just renamed the file, but moved it into my current directory as well. And then I recalled the typical mv tutorials which usually explain how the unix filesystem works, and how with that understanding, mv’s behavior makes sense.

In other words, mv combines two conceptual functions into one thing, simply because that’s the underlying implementation.

And I realized that this kind of “implementation leakage” occurs with many git commands. The non plus ultra evidence is the excellent post, Git Reset Demystified by Scott Chacon. It’s about git’s equivalent to svn revert — a very important function, undoing your changes. But even though Scott is very knowledgable about git and even authored the book, Pro Git , he

…never strongly understood the command beyond the handful of specific use cases that I needed it for. I knew what the command did, but not really how it was designed to work.

It’s no wonder that ordinary git users don’t fully grasp these commands. In a final unintentional confirmation of my theory about git’s problems, Scott presents this 6×4 table as a learning aide:

Like studying German verb conjugations

Another example is the well written O’Reilly book Version Control with Git . By necessity, It teaches the internal implementation of git before explaining how to fully use it. Or, as David Eisinger says,

…until you wrap your head around its internal model, it’s easy to wind up in a jumble of merge commits or worse.

Fixing git: two ideas

See also