Created
June 13, 2012 17:13
-
-
Save pauldowman/2925327 to your computer and use it in GitHub Desktop.
Script to open a browser with the github commit listing for the current repo & branch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BRANCH=`git branch | grep '^\*' | awk '{print $2}'` | |
REPO=`git remote -v | grep origin | head -1 | sed 's/[^:]*:\([^\.]*\).*/\1/'` | |
open "https://github.com/$REPO/commits/$BRANCH" |
What's DIR=
pwd`` for?
Oh, vestigial code from the previous life of this script. Gone now.
That's what I thought, but I thought there was a chance it might be Bash voodoo :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OS X only. Don't forget to make the script executable and put it in your path.