使用 .git/info/exclude 忽略文件 - yarn.lock 的问题

时间:2021-04-23 22:26:31

标签: git

我正在修改 .git/info 中的排除文件,它是这样的:

# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
#*~ yarn.lock
~yarn.lock
yarn.lock

它不会忽略那个文件,我做错了什么?我的老板要求在不修改 .ignore 的情况下忽略该文件。

所以当我输入 git status 时,它会是这样的:

Changes not staged for commit:


 (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   yarn.lock

提前致谢!

0 个答案:

没有答案
相关问题