Skip to content

Instantly share code, notes, and snippets.

@mike3k
Created July 31, 2013 20:30
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mike3k/6125852 to your computer and use it in GitHub Desktop.
Save mike3k/6125852 to your computer and use it in GitHub Desktop.
Use this as a custom action in SourceTree to view the selected commit on Github. In the custom action editor, specify the parameters $REPO $SHA
#!/bin/sh
cd $1
URL=`git remote -v |grep "fetch)" |awk '{print $2;}'|sed -e's#git@github.com:#http://github.com/#'|sed -e's|\.git||'`
open ${URL}/commit/$2
@mike3k
Copy link
Author

mike3k commented Jul 31, 2013

Custom action setting

@fotoflo
Copy link

fotoflo commented May 18, 2016

Hmm I get error: Couldn't posix_spawn: error 8

@xingheng
Copy link

@fotoflo Make sure your shell shebang is right in the first line there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment