Skip to content

WeiZhenOoooo/git_tips

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 

Repository files navigation

GitTips

版本升级

针对Windows Git 升级

  • version <=2.17.1更新命令:

    git update
  • version > 2.17.1更新命令:

    git update-git-for-windows
    

指定克隆

有时候,整个项目太大了,我们只想clone项目的某个目录或某个文件

  1. 稀疏克隆

    开启Git稀疏克隆,并下载除了具体的文件内容Blob对象之外的其他对象文件,包括tree对象、commit对象、tag对象,以保证git历史记录和项目目录结构的完整性。这样可以实现快速、高效地克隆大型仓库,并节省存储空间。

    git clone --filter=blob:none --sparse <your-git-url>
  2. 指定拉取

    git sparse-checkout add <your-folder>

    或者

    git sparse-checkout set <your-folder>

参考

Git只克隆远程仓库的某一个目录或文件

windows git升级

About

有关git使用的一些小技巧,特此记录

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors