把另一分支检出到独立目录
git worktree add <dir> <branch> 是「其他实用命令」分类下的常用命令,作用是:把另一分支检出到独立目录。
git worktree add <dir> <branch>
典型用法如下:git worktree add ../hotfix main。你可以查看本页上方同组的相关命令,或直接复制到终端运行。
git worktree add ../hotfix main