gitbutler icon indicating copy to clipboard operation
gitbutler copied to clipboard

worktree: use human readable names

Open schacon opened this issue 1 month ago • 1 comments

Instead of this:

❯ but worktree new sc-branch-74
Preparing worktree (new branch 'gitbutler/worktree/7c67c2c6-4044-43e2-b88f-4b80e661b5ce')
Created worktree at: /Users/schacon/projects/gitbutler/.git/gitbutler/worktrees/7c67c2c6-4044-43e2-b88f-4b80e661b5ce
Reference: refs/heads/sc-branch-74

Perhaps this (with some colors for the new branch name, the from branch name and the new path):

❯ but worktree new sc-branch-74
Preparing worktree (new branch 'gitbutler/worktree/sc-branch-74-a')
 - creating worktree from branch: sc-branch-74
 - worktree base at 204e309 [origin/main] Merge pull request #10 from schacon/sc-description

Checking out new tree...

Created worktree at: /Users/schacon/projects/gitbutler/.git/gitbutler/worktrees/sc-branch-74-a

Should also take a manual branch name if preferred (but worktree new -n experiment-1 sc-branch-74)

Should also take the --json option:

❯ but --json worktree new sc-branch-74
{
  'branch': 'gitbutler/worktree/sc-branch-74-a',
  'worktreePath': '/Users/schacon/projects/gitbutler/.git/gitbutler/worktrees/sc-branch-74-a',
  'base': '204e309'
}

schacon avatar Nov 07 '25 08:11 schacon

going to use -b to be same as git checkout

Caleb-T-Owens avatar Nov 07 '25 14:11 Caleb-T-Owens