java - 我想在控制台中使用 Git,并使用 Intellij 作为我的

标签 java eclipse git intellij-idea

我想使用 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/

相关文章:

java - Swing 绘制在不正确的坐标上

java - 如何从 Quickaction 启动 Activity ?

linux - GNU ARM - 未找到 nano.specs

eclipse - 在eclipse中在哪里编写maven命令

eclipse - 红帽 jboss 开发者工作室未打开

java - 如果 doc 值用于 Elasticsearch 中的某个字段,那么存储该字段是否多余?

java - 没有 Eclipse 的 JUnit : how to get the TestRunner Window

git - TeamCity 将参数从服务器传递到构建代理

windows - 权限被拒绝 (publickey) - 无法使用 Git 推送或 pull

ios - 找不到 React Native RTCAnimation