The short answer is no. Some items, such as the index, the HEAD
, and the in-progress rebase information, are stored in or associated with the work-tree.
You can, as you suggested in your own answer, make a new clone; or, with Git versions 2.6 or above, use git worktree add
. (The git worktree
feature appears in 2.5 but there was a brief rush of fixes followed by a longer trickle of smaller fixes, so this works best in the latest Git versions.)
What git worktree add
does is create additional work-trees using the existing repository. This is similar to making a new clone, except that the underlying .git
repository is shared directly. Each added work-tree has its own separate index, so instead of the index for the work-tree, you now have an index per work-tree. Instead of the HEAD
, you have one HEAD
per work-tree, and so on.
There is one hard restriction on git worktree add
: each work-tree must be in a separate branch. So if your main work-tree, the one you are in the middle of rebasing, is on branch develop
, your added work-tree cannot also be on branch develop
. If you want or need that, go ahead and use a separate clone. (You never actually need it but the details on this get tricky.)