我正在修改 .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
提前致谢!