gpt4 book ai didi

java - 当代码不使用 git 时,Eclipse 中出现 Git 异常

转载 作者:行者123 更新时间:2023-11-30 04:23:26 24 4
gpt4 key购买 nike

每当我从正在运行的 Java 程序中打开外部文件夹时,都会收到此错误:

fatal: Not a git repository (or any of the parent directories): .git

据我所知,一切正常,但错误让我困惑。

用于打开文件夹的代码:

File file = new File(saveDirectory);
Desktop desktop = Desktop.getDesktop();
try {
desktop.open(file);
} catch (IOException e) {
e.printStackTrace();
}

我正在 Eclipse Juno 中构建程序,它也是一个 git 存储库

最佳答案

有一个bug关于同样的错误。

更新捆绑程序并查看其是否有效。显然,一些捆绑程序删除了 .git 目录。

关于java - 当代码不使用 git 时,Eclipse 中出现 Git 异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16429153/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com