git worktree 稀疏检出(sparseCheckout)

稀疏检出配置:

git config core.sparsecheckout true
echo another_folder/xxxx/ >> .git/info/sparse-checkout

worktree稀疏配置:

1.git worktree add -b xxxx_branch ./xxxx_branchorigin/xxxx_branch --no-checkout ,先使用--no-checkout,然后加配置,然后checkout

 

2.要在./git/worktrees/xxxx_branch/info下创建sparse-checkout文件

 

3.cd xxxx_branch && git checkout

posted @ 2019-08-22 10:09  zipon  阅读(694)  评论(0编辑  收藏  举报