GitHub Tricks – Notes from Aloha Ruby Conf 2012 – Zach Holman


I didn’t attend the Aloha Ruby Conf but I did get to see a great video on some tips and tricks on using GitHub and Git.

Instead of you having to watch the video I took some notes for us all, enjoy!

  • Add .diff or .patch to any Compare View, Pull Request or Commit Page.
  • Remove whitespace by adding ?w=1 to any diff URL to truncate whitespace
  • Git repo on GitHub is also a svn repository
    • svn checkout
  • HTTP & SSH, HTTP is now the default vs SSH being the default.
    • git push origin master  – asks for your password
    • if you click ssh it will save your selection forever.
  • You can clone without the .git at the end, works fine.
    git clone
    git clone
  • GitHub HD’s icon set is SUPER-ZOOMABLE (retina graphics)
  • Security
    • Public Keys listed
    • Repositories listed
  • Octocat started as an istockphotos image now they own the rights to it and dress it up funny 🙂
  • is a url shortener:   gitio <url> <name>
  • They have a mac app and a windows app.
  • Linguist is pretty cool
  • Reply to any email and it gets added to issue comments
  • Abusing Gist – github:gist
    • using gist for css
    • gists are full repos: public clone url:  git://
    •  – quick disposable projects
    • Image View Modes – compare image versions and swipe between versions.
  • Command Line GitHub
    • brew install hub
    • fancy cloning:  hub clone holman/boom
    • multi-remote pushes:  hub push origin,staging
    • attach a pull request to an issue: hub pull-request -i <ISSUE>
    • aliasing:  alias git=hub
  • 404 error pages has accelerometer support 🙂
  • keyboard shortcuts
    • T – keyboard finder  (like command t in textmate)
    • W – branch selector
    • S – quick search
    • ? – all commands listed
  • Subscribe people to an issue
    • /cc @username @username @username
      • mentioned users get subscribed to all subsiquent issues
    • @ORG/TEAM will mention a team directly
    • mention SHA they autolink
    • autolinked cross-repo shaws  USER@sha1 USER/REPO@SHA1
      • #19292  to autolink to an issue
      • USER/REPO#19292
  • Fenced code highlighting in readmes
    • ` ` ` php   (three backticks no spaces in between then the language you want to use) this specifies a language inline for this block.
    •  close it with ` ` `   (three backticks no spaces in between)
  • Auto-closing an issue
    • use anything like closes, closed or even close #92827
    • fixes fixed fix #82847  works too
  • Commits by author
  • Pulls needn’t be from a fork
    • branch to branch pull requests
  • Pull requests use screenshots
    • ![title](
    • all images are cached.
  • Convert issues to pull requests
    • POST /repos/:user/:repo/pulls
  • emoji
    • :emoj:
    • examples:   :shipit: :+1: :-1:  :heard: :fire: :rage2: :shit:
  • Line linking
    • select a range by adding a – and the ending number in the url:   #L16-25
  • Advanced compare view
    • {range} mater…branch
    • MASTER@{yesterday}…MASTER
    • MASTER@{2012-02-25}…MASTER

There is one comment

Leave a Reply