【问题标题】:failed to stat '.': No such file or directory无法统计“。”:没有这样的文件或目录
【发布时间】:2016-03-04 19:14:58
【问题描述】:

我目前正在使用 pfsense 作为防火墙。我想扩展 GUI 以提供我需要的更多功能。当我尝试使用 git 初始化 www 目录时,出现以下错误:

failed to stat '.': No such file or directory

我可以初始化其他目录,例如/usr/local/ 会很好地初始化,但是当我在/usr/local/ 中运行 git status 时,我会得到以下结果:

On branch master

Initial commit

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        bin/
        etc/
        include/
        info/
        lib/
        libdata/
        libexec/
        sbin/
        share/

这也应该显示www 目录。

pfsense 使用 lighthttpd 和 freeBSD - 如果有帮助的话。

提前致谢。

【问题讨论】:

    标签: git freebsd lighttpd pfsense


    【解决方案1】:

    您只需创建目录并从内部对其进行初始化,例如:

    g@crayon2:~/test % mkdir www
    g@crayon2:~/test % cd www
    g@crayon2:~/test/www % git init
    Initialized empty Git repository in /usr/home/g/test/www/.git/
    g@crayon2:~/test/www % 
    

    【讨论】:

    • 感谢您的回复。该目录已经存在并且里面有文件,但仍然抛出错误,如我的回答所示。
    • 好吧,在这种情况下,它与www 文件夹中存在的特定文件有关。您可以在该文件夹中执行ls -la 以及git initalize 命令的整个输出和错误吗?
    猜你喜欢
    • 2018-02-10
    • 1970-01-01
    • 1970-01-01
    • 2022-07-06
    • 1970-01-01
    • 2021-12-27
    • 2016-04-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多