You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
blog/check_git.sh

14 lines
220 B
Bash

4 years ago
#!/bin/bash
4 years ago
git fetch
HEADHASH=$(git rev-parse HEAD)
UPSTREAMHASH=$(git rev-parse master@{upstream})
if [ "$HEADHASH" != "$UPSTREAMHASH" ]
then
echo "remote has changed"
4 years ago
exit 1
4 years ago
else
4 years ago
#echo "no change"
4 years ago
exit 0
4 years ago
fi