Skip to content

Commit

Permalink
feat(.pull): Add fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
Jandini committed Jul 26, 2020
1 parent cbfca3f commit 822b967
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .dots/.pull.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,25 @@ rem ::: Description:
rem ::: Run git pull
rem :::

echo Pulling...
git pull
if %ERRORLEVEL% equ 0 exit /b

echo Something is wrong... Trying to add tracking to %DOT_GIT_BRANCH% branch
echo Fetching...
git fetch

echo Pulling again...
git pull
if %ERRORLEVEL% equ 0 exit /b

echo Trying to add tracking to %DOT_GIT_BRANCH% branch
git branch --set-upstream-to=origin/%DOT_GIT_BRANCH% %DOT_GIT_BRANCH%
if %ERRORLEVEL% neq 0 echo I am giving up...&exit /b

echo Trying to pull again...
echo Fetching...
git fetch

echo Pulling...
git pull
if %ERRORLEVEL% neq 0 echo Pull failed.&exit /b

Expand Down

0 comments on commit 822b967

Please sign in to comment.