Created
May 6, 2019 17:42
-
-
Save csanz/e41639b0c90ed3c29cd956fc01a37071 to your computer and use it in GitHub Desktop.
check if you need to pull new version from branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
git fetch --quiet | |
CHANGES=(`git rev-list HEAD..origin/production --count`) | |
echo $CHANGES | |
# now you can check if the value is higher than 0, if yes, then you can git pull |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment