Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/scala/17.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/17.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未跟踪的工作树瓷砖_Git - Fatal编程技术网

Git未跟踪的工作树瓷砖

Git未跟踪的工作树瓷砖,git,Git,在远程回购协议中,我尝试从中央回购协议获取更新。 奇怪的是,我 error: Untracked working tree file '.htaccess' would be overwritten by merge. Aborting My.gitignore和.git/info/exclude包含.htaccess 我缺少的是什么?问题是,您的本地Git repo中有.htaccess文件,并且未对其进行跟踪,因为它与.gitignore中的模式匹配。同时,该文件位于远程中心Git re

在远程回购协议中,我尝试从中央回购协议获取更新。 奇怪的是,我

error: Untracked working tree file '.htaccess' would be overwritten by merge.  Aborting
My.
gitignore
.git/info/exclude
包含
.htaccess


我缺少的是什么?

问题是,您的本地Git repo中有
.htaccess
文件,并且未对其进行跟踪,因为它与
.gitignore
中的模式匹配。同时,该文件位于远程中心Git repo中。因此,Git警告您,拉取更改将覆盖本地repo中的
.htaccess

你可以

  • 删除远程repo中的
    .htaccess
    。毕竟,它是在
    gitignore
  • 在您的回购中删除
    .htaccess
  • 通过发出命令来强制拉动
将项目添加到
gitignore
不会将其从存储库中删除。它只是阻止添加和跟踪它。因此,如果回购协议中已经存在
htaccess
,则在添加到
gitignore
之前,必须先将其删除

阅读:

gitignore文件指定Git故意未跟踪的文件 应该忽略。Git已跟踪的文件不受影响


问题是,您的本地Git repo中有
.htaccess
文件,并且未对其进行跟踪,因为它与
.gitignore
中的模式匹配。同时,该文件位于远程中心Git repo中。因此,Git警告您,拉取更改将覆盖本地repo中的
.htaccess

你可以

  • 删除远程repo中的
    .htaccess
    。毕竟,它是在
    gitignore
  • 在您的回购中删除
    .htaccess
  • 通过发出命令来强制拉动
将项目添加到
gitignore
不会将其从存储库中删除。它只是阻止添加和跟踪它。因此,如果回购协议中已经存在
htaccess
,则在添加到
gitignore
之前,必须先将其删除

阅读:

gitignore文件指定Git故意未跟踪的文件 应该忽略。Git已跟踪的文件不受影响