Skip to content

Instantly share code, notes, and snippets.

@ohe
Created August 12, 2013 15:01
Show Gist options
  • Save ohe/6211596 to your computer and use it in GitHub Desktop.
Save ohe/6211596 to your computer and use it in GitHub Desktop.
Review upstream commits (actually works only on OS X with open command)
#!/bin/bash
# Place here your github organization/account name
GITHUB_ACCOUNT=
COMMITS=`git log ..@{u} --format=%h --no-merges`
for commit in $COMMITS
do
git --no-pager show $commit
echo "View on Github (y/n)"
read view_on_github
[[ "$view_on_github" == "y" ]] && open https://www.github.com/$GITHUB_ACCOUNT/${PWD##*/}/commit/$commit
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment