Skip to content

Commit

Permalink
Update via git fetch instead of pull
Browse files Browse the repository at this point in the history
  • Loading branch information
mudlee committed Jul 28, 2021
1 parent d4f87bf commit 8bc73dc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ccontrol.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,10 @@ main () {
exit 1
fi

git checkout .
git checkout . 2>&1
git fetch 2>&1
git reset --hard origin/$branch 2>&1
git checkout $branch 2>&1
git pull

if [ "$?" != "0" ]; then
rm yarn.lock > /dev/null 2>&1
Expand Down Expand Up @@ -259,7 +260,8 @@ main () {

elif [[ ( "$1" = "update" ) && ( "$2" = "self" ) && ( -z "$3" ) ]]; then

git pull
git fetch
git reset --hard origin/$branch

elif [[ ( "$1" = "remove" ) && ( "$2" = "self" ) && ( -z "$3" ) ]]; then

Expand Down

0 comments on commit 8bc73dc

Please sign in to comment.