You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a worktree add with --branch option fails because the destination dir already exists, the newly created branch is not cleaned up as I expected. When I remove the offending destination dir, and re-run the worktree add, it fails because of existing branch:
bio:radu [Linux] ~/proj/vscode.config (start)
$ git worktree add -b gnumake/misplaced ../../vscode-autotools/vendor/gnumake/.vscode start
Preparing worktree (new branch 'gnumake/misplaced')
- fatal: '../../vscode-autotools/vendor/gnumake/.vscode' already exists
bio:radu [Linux] ~/proj/vscode.config (start)
$ git worktree add -b gnumake/misplaced ../../vscode-autotools/vendor/gnumake/.vscode start
Preparing worktree (new branch 'gnumake/misplaced')
- fatal: a branch named 'gnumake/misplaced' already exists
bio:radu [Linux] ~/proj/vscode.config (start)
$ git branch -d gnumake/misplaced
Deleted branch gnumake/misplaced (was f36fbd7).
bio:radu [Linux] ~/proj/vscode.config (start)
$ git worktree add -b gnumake/misplaced ../../vscode-autotools/vendor/gnumake/.vscode start
Preparing worktree (new branch 'gnumake/misplaced')
+ HEAD is now at f36fbd7 Start of vscode.config
Activity