Skip to content

Instantly share code, notes, and snippets.

@dep-deprecated
Created July 22, 2016 17:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dep-deprecated/0fd40518a5b45b7729282a08a24f8809 to your computer and use it in GitHub Desktop.
Save dep-deprecated/0fd40518a5b45b7729282a08a24f8809 to your computer and use it in GitHub Desktop.
Show a list of commits unique to a git branch
#! /bin/bash
if [[ -z "$2" ]]; then
echo 'Shows commits exclusive to a branch (from master)'
echo 'sha_diff [new_branch] [old_branch] (ex: sha_diff tp1234_dep_int master)'
else
git fetch && git log $1 ^origin/$2 --no-merges --oneline
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment