Skip to content
Snippets Groups Projects
Unverified Commit b00ece89 authored by Andrei Karas's avatar Andrei Karas
Browse files

pull.sh: improve updating server-code repo if origin remote not present.

parent f0307b60
No related branches found
Tags s20180417
No related merge requests found
......@@ -38,10 +38,9 @@ function status2 {
if [[ -n "${STR}${STR2}${STR3}" ]]; then
echo -e "\e[1;31mCant pull because changes not pushed\e[0m"
else
git pull --no-commit
git fetch upstream
git fetch origin
export BRANCH=$(git rev-parse --abbrev-ref HEAD)
git reset --hard "origin/${BRANCH}"
git reset --hard "$(git rev-parse --abbrev-ref --symbolic-full-name @{u})"
fi
cd "$DIR"
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment