跑遍了该页面,有几个类似的话题都在谈论GIT_DISCOVERY_ACROSS_FILESYSTEM未设置消息。在我的情况下,我们的系统管理员已决定apache2目录必须位于已挂载的文件系统上,以防服务器的磁盘停止工作并必须重建。我通过一个简单的df命令找到了它:
--> UBIk <--:root@ns1:[/etc]
--PRODUCTION--(16:48:43)--> df -h
Filesystem Size Used Avail Use% Mounted on
<snip>
/dev/mapper/vgraid-lvapache 63G 54M 60G 1% /etc/apache2
<snip>
为了解决这个问题,我只是在root用户的shell中添加了以下内容(因为他们是唯一需要查看etckeeper修订版的用户:
export GIT_DISCOVERY_ACROSS_FILESYSTEM=1
一切都很好,很高兴。
更多说明:
--> UBIk <--:root@ns1:[/etc]
--PRODUCTION--(16:48:54)--> export GIT_DISCOVERY_ACROSS_FILESYSTEM=0
--> UBIk <--:root@ns1:[/etc]
--PRODUCTION--(16:57:35)--> git status
On branch master
nothing to commit, working tree clean
--> UBIk <--:root@ns1:[/etc]
--PRODUCTION--(16:57:40)--> touch apache2/me
--> UBIk <--:root@ns1:[/etc]
--PRODUCTION--(16:57:45)--> git status
On branch master
Untracked files:
(use "git add <file>..." to include in what will be committed)
apache2/me
nothing added to commit but untracked files present (use "git add" to track)
--> UBIk <--:root@ns1:[/etc]
--PRODUCTION--(16:57:47)--> cd apache2
--> UBIk <--:root@ns1:[/etc/apache2]
--PRODUCTION--(16:57:50)--> git status
fatal: Not a git repository (or any parent up to mount point /etc/apache2)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
--> UBIk <--:root@ns1:[/etc/apache2]
--PRODUCTION--(16:57:52)--> export GIT_DISCOVERY_ACROSS_FILESYSTEM=1
--> UBIk <--:root@ns1:[/etc/apache2]
--PRODUCTION--(16:58:59)--> git status
On branch master
Untracked files:
(use "git add <file>..." to include in what will be committed)
me
nothing added to commit but untracked files present (use "git add" to track)
希望这可以帮助某人... -wc
tree
您的git repo内部的输出是什么?