File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ if git ls-remote --exit-code origin "$BKG_INDEX" &>/dev/null; then
4848 [ -d " $BKG_INDEX " .bak ] || rm -rf " $BKG_INDEX " .bak
4949 git worktree move " $BKG_INDEX " " $BKG_INDEX " .bak & > /dev/null
5050 git fetch --depth=1 origin " $BKG_INDEX "
51+ git branch --track -f " $BKG_INDEX " " origin/$BKG_INDEX " 2> /dev/null || git branch -f " $BKG_INDEX " " origin/$BKG_INDEX "
5152 BKG_IS_FIRST=true
5253else
5354 fd_list=$( find . -type f -o -type d | grep -vE " ^\.($|\/(\.git\/*|.*\.md$))" )
6263fi
6364
6465git worktree remove -f " $BKG_INDEX " 2> /dev/null
65- git worktree add --track -f -B " $BKG_INDEX " " $BKG_INDEX " " origin/ $BKG_INDEX "
66+ git worktree add -f " $BKG_INDEX " " $BKG_INDEX "
6667[[ -d " $BKG_INDEX " || ! -d " $BKG_INDEX " .bak ]] || git worktree move " $BKG_INDEX " .bak " $BKG_INDEX "
6768pushd " $BKG_INDEX " || exit 1
6869git reset --hard origin/" $BKG_INDEX "
You can’t perform that action at this time.
0 commit comments