如何将完全结帐转换为稀疏结帐? [英] How do I convert full checkout to sparse checkout?

查看:132
本文介绍了如何将完全结帐转换为稀疏结帐?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

已经对存储库进行了全面检出,如何将其转换为稀疏检出?

Having a full checkout of a repository, how can I convert it into a sparse checkout?

推荐答案

运行

git config core.sparseCheckout true

然后创建.git/info/sparse-checkout

/*
!excluded-dir/

然后运行

git checkout master

excluded-dir将消失.

我的问题是我没有在我的.git/info/sparse-checkout中的排除目录后面加上斜杠,这要感谢 http://www.richsomerfield.com/post/2014-03-05-adventures-in-git-sparsecheckouts/

My problem was that I did not put a trailing slash behind the excluded directory in my .git/info/sparse-checkout Much thanks to http://www.richsomerfield.com/post/2014-03-05-adventures-in-git-sparsecheckouts/

这篇关于如何将完全结帐转换为稀疏结帐?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆