From 50718ecb0fe481ff58e3473f71b8e57b98b8fa19 Mon Sep 17 00:00:00 2001 From: Zenithal Date: Tue, 11 Apr 2023 15:11:53 +0800 Subject: [PATCH] git-worktree: handle upstream force push See https://github.com/rust-lang/crates.io-index/commit/8bb596f3f1 --- git-worktree.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-worktree.sh b/git-worktree.sh index 275a105..e13d6e7 100755 --- a/git-worktree.sh +++ b/git-worktree.sh @@ -34,7 +34,7 @@ function checkout_branch() { $git_option clone "$repo_dir" --branch "$branch" --single-branch "$work_tree" else cd "$work_tree" - $git_option pull + $git_option checkout -B "$branch" "origin/$branch" fi }