[英]git log filter with sparse checkout
I have a large project that I use sparse checkout to exclude one directory (which is quite large). 我有一个大项目,我使用稀疏checkout排除一个目录(这是非常大)。 However, when I use git log, the commit in the directory that I already excluded with sparse checkout will show up, polluting my real interests.
但是,当我使用git log时,我已经用稀疏结账排除的目录中的提交将会出现,从而污染了我的真实兴趣。
The answer given for this question by specifying one directory doesn't work for me since I need to exclude one directory but include many. 通过指定一个目录为这个问题给出的答案对我不起作用,因为我需要排除一个目录但包含许多目录。 I came from perforce where if I specify
...
, it will not include files or directories that were excluded by my p4 client spec. 我来自perforce,如果我指定
...
,它将不包括我的p4客户端规范排除的文件或目录。
Use the exclude
option with pathspecs. 将
exclude
选项与pathspecs一起使用。 For instance: 例如:
$ git log --first-parent --name-status -- ':(exclude)plugin/'
in a clone of the syntastic repository doesn't show commit 69b0c3e85a319ad21f560d7b25524cf02921be82
, while git log
without the exclusion does show it. 在一个合成存储库的克隆中没有显示提交
69b0c3e85a319ad21f560d7b25524cf02921be82
,而没有排除的git log
确实显示它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.