By francis_hao    Mar 18,2018

 

git ls-fles 显示index和工作区的文件的信息。

git ls-files [-z] [-t] [-v]
        (--[cached|deleted|others|ignored|stage|unmerged|killed|modified])*
            (-[c|d|o|i|s|u|k|m])*
            [-x <pattern>|--exclude=<pattern>]
            [-X <file>|--exclude-from=<file>]
            [--exclude-per-directory=<file>]
            [--exclude-standard]
            [--error-unmatch] [--with-tree=<tree-ish>]
            [--full-name] [--abbrev] [--] [<file>...]

 

描述

显示由工作目录中添加到缓存中的文件的相关信息。

下面的选项决定要显示的文件

 

选项

只选取了常用的选项,更多选项参见参考【1】

选项

含义

-c, --cached

显示缓存了的文件(默认)

-d, --deleted

显示删除了的文件

-m, --modified

显示修改了的文件

-o, --others

显示其他类型的文件(比如未追踪的)

-i, --ignored

显示忽略了的文件(满足忽略模式的)

-s, --stage

显示暂存的条目的相关信息(模式位,文件哈希后的值,暂存号和文件名),

[<tag> ]<mode> <object> <stage> <file>

比如:

git使用笔记(十三)ls-files

 

 

git使用笔记(十三)ls-files
本文由 刘英皓 创作,采用 知识共享署名-非商业性使用-相同方式共享3.0中国大陆许可协议 进行许可。欢迎转载,请注明出处:
转载自:http://www.cnblogs.com/yinghao1991/p/8594962.html

 

 

参考

【1】man git-ls-files

相关文章:

  • 2022-12-23
  • 2021-06-04
  • 2021-08-15
  • 2021-10-09
  • 2021-05-18
猜你喜欢
  • 2022-12-23
  • 2021-12-12
  • 2021-12-13
  • 2021-12-17
相关资源
相似解决方案