We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0caf2a1 commit c3f95c1Copy full SHA for c3f95c1
1 file changed
scripts/wc2wt.sh
@@ -37,7 +37,7 @@ dir=$(basename $(pwd))
37
# sanitize branch name for directory name (replace / with -)
38
dir_suffix=$(echo "$BRANCH" | tr '/' '-')
39
40
-git worktree add -b "$BRANCH" "../$dir-$dir_suffix" HEAD
+git worktree add "../$dir-$dir_suffix" "$BRANCH" || git worktree add -b "$BRANCH" "../$dir-$dir_suffix" HEAD
41
42
og_path=$(pwd)
43
wt_path=$(cd "../$dir-$dir_suffix" && pwd)
0 commit comments