Created
March 10, 2022 06:32
-
-
Save radimih/977c9075aeebc7ea0c23e3284f7b1db3 to your computer and use it in GitHub Desktop.
Check git repository updates
This file contains 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
cd path-to-git-repository | |
if [ `git log --pretty=%H ...refs/heads/master^` == `git ls-remote origin -h refs/heads/master | cut -f1` ]; then | |
exit 1; | |
fi | |
git pull |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment