http://schacon.github.io/git/git-read-tree.html#_sparse_checkout

Existing Repository

If you already have a repository, simply enable and configure sparse-checkout as above and do git read-tree.

  1. Enable sparse-checkout:

    git config core.sparsecheckout true
  2. Configure sparse-checkout by listing your desired sub-trees in .git/info/sparse-checkout:

    echo some/dir/ >> .git/info/sparse-checkout
    echo another/sub/tree >> .git/info/sparse-checkout
  3. Update your working tree:

    git read-tree -mu HEAD

可以略过第二步

1.   git config core.sparsecheckout true

2   Update your working tree:

git read-tree -mu HEAD

3

git checkout [branch] -- fileName

最新文章

  1. Liunx下配置DNS服务
  2. CodeSmith7 系列 破解教程
  3. 今天发现一些很有意思的ubuntu命令
  4. Unity unsafe
  5. 1. 从系统架构到Hello World
  6. W3C标准
  7. python学习-day15:函数作用域、匿名函数、函数式编程、map、filter、reduce函数、内置函数r
  8. MVC4发布到IIS7报404错误
  9. awk 传入外部参数
  10. phpcms(4) V9 栏目管理
  11. oracle触发器使用总结
  12. SQL语句中的乘号
  13. programData
  14. JDK基本介绍
  15. 使用.NET REACTOR制作软件许可证
  16. python 字符串(汉语)获得MD5编码
  17. 利用C#进行Socket通信编程之二:一个实例
  18. Chapter 5 Blood Type——7
  19. Hexo自定义页面的方法
  20. springboot学习二:配置文件配置

热门文章

  1. unity笔录
  2. android教学大纲
  3. 每个Web开发者必备的9个软技能
  4. 对比git pull和git pull --rebase
  5. ansible尝试
  6. 深入分析Java Web开发
  7. 【ORACLE】“System.Exception: System.Data.OracleClient 需要 Oracle 客户端软件 version 8.1.7 或更高版本。”解决办法
  8. Linux用户相关命令
  9. .net core 12
  10. mongodb集群+分片部署(二)