Skip to content

Commit

Permalink
Check if git identified changes to directory
Browse files Browse the repository at this point in the history
Signed-off-by: George J Padayatti <george.padayatti@igrant.io>
  • Loading branch information
georgepadayatti committed Jun 16, 2022
1 parent edabbf2 commit 7a0a05d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
if ! (git diff --exit-code origin/master..master > /dev/null) \
|| ! (git diff --exit-code master > /dev/null) \
|| ! [[ -z "$(git status --porcelain)" ]] ; then
echo "Your local repo has some changes that aren't pushed to origin/master ."
exit 1
fi

0 comments on commit 7a0a05d

Please sign in to comment.