Loading...
Loading...
Compare original and translation side by side
.git.gitgit worktree add ../hotfix hotfix-branch # existing branch
git worktree add -b new-branch ../new main # create from main
git worktree add --detach ../inspect <sha> # for read-only review
git worktree list [--porcelain]
git worktree lock ../critical # prevent prune
git worktree move ../old ../new
git worktree remove ../hotfix # after cd out
git worktree prune # clean stale metadata
git worktree repair # fix links after movesgit worktree add ../hotfix hotfix-branch # 现有分支
git worktree add -b new-branch ../new main # 基于main创建新分支
git worktree add --detach ../inspect <sha> # 用于只读评审
git worktree list [--porcelain]
git worktree lock ../critical # 防止被清理
git worktree move ../old ../new
git worktree remove ../hotfix # 需先退出该目录
git worktree prune # 清理过期元数据
git worktree repair # 移动后修复链接--detach--forceremove.gitrm -rf.git/worktrees/<name>/prune--detach--forceremove.gitrm -rf.git/worktrees/<name>/prunegit worktree add ../review-1234 --detach origin/pr/1234git worktree add -b hotfix/urgent ../hotfix origin/mainnode_modulestarget/git bisect rungit worktree add ../review-1234 --detach origin/pr/1234git worktree add -b hotfix/urgent ../hotfix origin/mainnode_modulestarget/git bisect rungit config extensions.worktreeConfig true
git config --worktree user.email alt@example.comcore.barecore.worktreegit config extensions.worktreeConfig true
git config --worktree user.email alt@example.comcore.barecore.worktreepost-checkoutyarn installrefs/stash.gitgit worktree prunepost-checkoutyarn installrefs/stash.gitgit worktree prune