diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-04-12 19:04:48 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-04-12 19:04:48 +0300 |
commit | b00ece89a4f650973446975948b8328611a471f2 (patch) | |
tree | 895d9e9ffe7ec06eba05dcb22f0c54439a899bd2 /pull.sh | |
parent | f0307b60da2ec47a62f1187f6ca310bb42d52c2a (diff) | |
download | evol-all-b00ece89a4f650973446975948b8328611a471f2.tar.gz evol-all-b00ece89a4f650973446975948b8328611a471f2.tar.bz2 evol-all-b00ece89a4f650973446975948b8328611a471f2.tar.xz evol-all-b00ece89a4f650973446975948b8328611a471f2.zip |
pull.sh: improve updating server-code repo if origin remote not present.s20180417
Diffstat (limited to 'pull.sh')
-rwxr-xr-x | pull.sh | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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" } |