Skip to content

Instantly share code, notes, and snippets.

@Dkendal
Created February 29, 2016 03:45
Show Gist options
  • Select an option

  • Save Dkendal/82454f47115f8517f4a7 to your computer and use it in GitHub Desktop.

Select an option

Save Dkendal/82454f47115f8517f4a7 to your computer and use it in GitHub Desktop.
#!/bin/bash
ahead=`git log $2..$1 --pretty=oneline | wc -l`
behind=`git log $1..$2 --pretty=oneline | wc -l`
echo "$1 ahead $ahead commits, behind $behind commits, of $2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment