首页 > 其他分享 >TIL: Git worktree

TIL: Git worktree

时间:2022-12-15 23:00:16浏览次数:42  
标签:git working .. worktree TIL Git branch new experimental

# 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

相关文章