Skip to content

Instantly share code, notes, and snippets.

@emmanuelbernard
Created July 27, 2011 07:19
Show Gist options
  • Save emmanuelbernard/1108844 to your computer and use it in GitHub Desktop.
Save emmanuelbernard/1108844 to your computer and use it in GitHub Desktop.
Do work if changes are present
#!/bin/bash
SHA_REMOTE=`git rev-parse upstream/production`
SHA_LOCAL=`git rev-parse production`
if [ "$SHA_LOCAL" != "$SHA_REMOTE" ]; then
echo "different"
else
echo "same"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment