我的 Git 有问题,运行命令时出现以下错误git init
:重新初始化 C:/Users/Documents/Projects/ 中的现有 Git 存储库。
但是,如果我也给出该命令,git add .
则会出现以下错误: fatal: 此操作必须在工作树中执行。最后,当我尝试输入 git-gui 时,我收到以下消息
fatal: This operation must be performed in a working tree while executing "clse $fd" (procedure "git" line 5) called from within "git rev-parse --show-toplevel" (file "C:/Program Files/Git/mingw64/libexec/git-core/git-gui.tcl" line 1297) called from the "source [file join [file dirname[info script]] git-gui.tcl" line (file "C:\Program Files\Git\mingw64\libexec\git-core\git-gui" line 25)
。
我已经尝试了一切,从我的电脑中删除数据,删除 git 文件夹,手动创建 git 文件夹等。
我希望获得有关如何解决此问题的帮助。