Skip to content

Instantly share code, notes, and snippets.

@ancho85
Created August 23, 2019 15:39
Show Gist options
  • Save ancho85/99daab0e8a5fb5d0663f403eebfda997 to your computer and use it in GitHub Desktop.
Save ancho85/99daab0e8a5fb5d0663f403eebfda997 to your computer and use it in GitHub Desktop.
simple ahead behind git script
#!/bin/bash
ahead=$(git rev-list --count master..$1)
behind=$(git rev-list --count $1..master)
echo "Ahead $ahead, behind $behind"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment