'mu worktree add...' does not produce usable results, this PR improves that behavior by using the repo relative path from the config to regenerate the repo structure in the worktree destination, as well as copying the .murepo to the new worktree so mu repo commands work as expected.
mu worktreeadd
will create a mu-repo copy of the currently active repo group in a subfolder of the current folder called _wt/
mu wtadd #wtadd is a shortcut name
will create a mu-repo copy of the currently active repo group in a subfolder of the specified folder called
git worktrees are great for having multiple copies of repos (always have a develop, master, release, and any number of feature branches for instance) as shallow copies with shared stashes.
Feel free to provide feedback or to take this PR and rework it as needed.
'mu worktree add...' does not produce usable results, this PR improves that behavior by using the repo relative path from the config to regenerate the repo structure in the worktree destination, as well as copying the .murepo to the new worktree so mu repo commands work as expected.
mu worktreeadd
will create a mu-repo copy of the currently active repo group in a subfolder of the current folder called _wt/
mu wtadd #wtadd is a shortcut name
will create a mu-repo copy of the currently active repo group in a subfolder of the specified folder called
git worktrees are great for having multiple copies of repos (always have a develop, master, release, and any number of feature branches for instance) as shallow copies with shared stashes.
Feel free to provide feedback or to take this PR and rework it as needed.