使用.git/info/exclude忽略文件-Thread.lock存在问题
我正在修改.git/info中的排除文件,如下所示:使用.git/info/exclude忽略文件-Thread.lock存在问题,git,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
# 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
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
它不会忽略那个文件,我做错了什么?这是我老板要求我忽略该文件而不修改.ignore
因此,当我将git状态设置为:
# 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
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
未为提交而暂存的更改:
(使用“git add…”更新将提交的内容)
(使用“git restore…”放弃工作目录中的更改)
修改:纱线.锁紧
提前谢谢
modified:warn.lock
表示文件已被跟踪。您不能忽略跟踪的文件。您可以将其从回购协议中删除,但您必须询问您的上司和团队是否同意。谢谢!我会的。