与.git/info/exclude相反-包括.gitignore排除的文件 [英] Opposite of .git/info/exclude - including files that are excluded by .gitignore

查看:530
本文介绍了与.git/info/exclude相反-包括.gitignore排除的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以包含项目.gitignore文件明确排除的文件?与.git/info/exclude清单如何在不受版本控制的情况下排除文件类似,我想还原.gitignore所做的排除,以便可以看到这些文件中的更改.

Is there a way to include files specifically excluded by a projects .gitignore file? Similar to how .git/info/exclude listings exclude files while not being under version control I want to revert exclusions done by .gitignore so I can see changes in these files.

推荐答案

不包括.gitignore中的文件,文件有四种状态:

Excluding files in .gitignore, there are four status of files:

  1. 未跟踪
  2. 已删除
  3. 上演但已修改
  4. 上演没有变化

因此您可以使用git ls-files -o查看未跟踪的文件,git ls-files -d查看上次操作删除的文件,git ls-files -m查看修改的文件,以及git ls-files -s查看已暂存的文件

so you can use git ls-files -o to view untracked files, git ls-files -d to view deleted files by the last operation, git ls-files -m to view modified files, and git ls-files -s to view files have been staged

这篇关于与.git/info/exclude相反-包括.gitignore排除的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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