Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用.git/info/exclude忽略文件-Thread.lock存在问题_Git - Fatal编程技术网

使用.git/info/exclude忽略文件-Thread.lock存在问题

使用.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/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
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
表示文件已被跟踪。您不能忽略跟踪的文件。您可以将其从回购协议中删除,但您必须询问您的上司和团队是否同意。谢谢!我会的。