Add a check for being a git repo
parent
fbfd49afb4
commit
7e341e3b1f
|
@ -7,6 +7,12 @@ then
|
||||||
echo " git force <remote> <branch>"
|
echo " git force <remote> <branch>"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
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=""
|
REMOTE=""
|
||||||
BRANCH=""
|
BRANCH=""
|
||||||
PRETTY="--pretty=format:%h, %an <%ae>, %cr: %s"
|
PRETTY="--pretty=format:%h, %an <%ae>, %cr: %s"
|
||||||
|
|
Loading…
Reference in New Issue