summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpull.sh5
1 files changed, 2 insertions, 3 deletions
diff --git a/pull.sh b/pull.sh
index 38b5ea3..46cb6be 100755
--- a/pull.sh
+++ b/pull.sh
@@ -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"
}