Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a worktree for an existing branch with a /? #105

Open
9999years opened this issue Feb 5, 2025 · 1 comment
Open

Create a worktree for an existing branch with a /? #105

9999years opened this issue Feb 5, 2025 · 1 comment

Comments

@9999years
Copy link
Owner

If you want to create a worktree for a new branch with a / in it, you can do git prole add -b puppy/doggy, but if a puppy/doggy branch already exists, it errors out.

If you do git prole add puppy/doggy then doggy is used as the branch name.

If you do git prole add -B puppy/doggy, then the puppy/doggy branch is reset to the default branch.

Make it better!

@9999years
Copy link
Owner Author

Proposed design: git prole add -b BRANCH should check out BRANCH if it exists and create it otherwise. -B can still be used to force reset an existing branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant