# Create a new branch called "experimental" and switch to it
git checkout -b experimental
# Create a new working directory for the "experimental" branch
git worktree add ../experimental-dir experimental
# Switch to the new working directory
cd ../experimental-dir
# Make some changes and commit them
...
# Switch back to the main working directory
cd ../main-dir
# Merge the changes from the "experimental" branch
git merge experimental
标签:git,working,..,worktree,TIL,Git,branch,new,experimental
From: https://www.cnblogs.com/talentzemin/p/16986199.html