diff --git a/git-force b/git-force index ce495d1..a7af5a6 100755 --- a/git-force +++ b/git-force @@ -7,6 +7,12 @@ then echo " git force " exit 0 fi +git rev-parse --is-inside-work-tree > /dev/null 2>&1 +if [[ "$?" != "0" ]] +then +echo "error: not a git repository" +exit 10 +fi REMOTE="" BRANCH="" PRETTY="--pretty=format:%h, %an <%ae>, %cr: %s"