Thread (13 messages) flat view 13 messages, 5 authors, 2021-02-23

New orphan worktree?

From: Stefan Monnier <hidden>
Date: 2021-01-06 16:17:50

I use worktrees extensively (and rarely use `git checkout`).

When I need to create a new orphan branch with a new matching worktree
(or submodule), I find it is quite cumbersome.  I basically have
to do something like:

    git worktree add -b dummy foo
    cd foo
    git checkout --orphan newbranch
    git rm -rf .
    git branch -D dummy

I wish I could just do something like:

    git worktree add --orphan foo newbranch

instead,


        Stefan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help