Skip to content

when removing a worktree, automatically cd to main worktree #31

@raine

Description

@raine
~/c/w/i/w/walkingmate-og-image % wtp remove icon-testing                              icon-testing
Removed worktree 'icon-testing' at /Users/raine/code/worktrees/icon-testing
~/c/w/i/w/walkingmate-og-image %
~/c/w/i/w/walkingmate-og-image %
~/c/w/i/w/walkingmate-og-image %
~/c/w/i/w/walkingmate-og-image %
~/c/w/i/w/walkingmate-og-image % pwd
/Users/raine/code/worktrees/icon-testing/walkingmate/walkingmate-og-image
~/c/w/i/w/walkingmate-og-image % ls
~/c/w/i/w/walkingmate-og-image %
~/c/w/i/w/walkingmate-og-image % wtp cd @
not in a git repository

Solutions:
  • Run 'git init' to create a new repository
  • Navigate to an existing git repository
  • Check if you're in the correct directory
~/c/w/i/w/walkingmate-og-image %

Not sure if it has any downsides, seems like it would be convenient

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions