我想使用 Intellij,但没有它的 git 插件。 我在控制台中使用 eclipse + git ,从来没有遇到过问题。只需推/pull/提交/添加等并用 eclipse 打开文件。 现在我已经切换到 Intellij,无论我如何打开/导入 pull 的文件到 Intellij,我都会遇到很多错误。
大多数时候它看起来像这样:
Exception in thread "main" java.lang.NullPointerException
at Test.main(Test.java:18)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
甚至是这样:
Exception in thread "main" java.io.FileNotFoundException: C:\Users\John\Desktop\Test\Program\GitFiles\GG\DC\out\production\DC\level1.txt (The system cannot find the specified path.)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileReader.<init>(FileReader.java:72)
at model.Map.mapImport(Map.java:35)
at model.Map.<init>(Map.java:26)
at model.Model.initialize(Model.java:120)
at model.Model.<init>(Model.java:37)
at Test.main(Test.java:27)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
但是,有什么方法可以绝对正确地将通过 Git 正确 pull 的项目文件导入到 Intellij 中? 我什至怀疑 Intellij 的 Git 插件可能会破坏一切,因为它注意到我正在使用的文件夹上有 Git。
我在这个问题上浪费了很多时间,如果能得到帮助,我将非常高兴!
您好, 约翰
最佳答案
如果您不想在 IntelliJ 中使用 Git,则应该禁用它。转到配置(在欢迎菜单中)> 插件 > Git 集成,然后取消选择它。 Looks like this
希望对您有帮助。
关于java - 我想在控制台中使用 Git,并使用 Intellij 作为我的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33981931/