Eclipse git pull文件时出现错误:org.eclipse.jgit.api.errors.CheckoutConflictException:

在使用git pull项目的时候,出现错误 

org.eclipse.jgit.api.errors.CheckoutConflictException: Checkout conflict with files:
geloushop/.classpath
geloushop/.project

具体的错误如下:(得双击出现的蓝色下划线文字,才能看到具体的错误)

org.eclipse.jgit.api.errors.CheckoutConflictException: Checkout conflict with files:
geloushop/.classpath
geloushop/.project
geloushop/.settings/.rebel.xml.bak

    at org.eclipse.jgit.api.MergeCommand.call(MergeCommand.java:420)

    at org.eclipse.jgit.api.PullCommand.call(PullCommand.java:345)

    at org.eclipse.egit.core.op.PullOperation$1.run(PullOperation.java:200)

    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)

    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2267)

    at org.eclipse.egit.core.op.PullOperation.execute(PullOperation.java:232)

    at org.eclipse.egit.ui.internal.pull.PullOperationUI.execute(PullOperationUI.java:176)

    at org.eclipse.egit.ui.internal.pull.PullOperationUI.access$0(PullOperationUI.java:168)

    at org.eclipse.egit.ui.internal.pull.PullOperationUI$1.runInWorkspace(PullOperationUI.java:141)

    at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)

    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Caused by: org.eclipse.jgit.errors.CheckoutConflictException: Checkout conflict with files:
geloushop/.classpath
geloushop/.project
geloushop/.settings/.rebel.xml.bak

    at org.eclipse.jgit.dircache.DirCacheCheckout.doCheckout(DirCacheCheckout.java:467)

    at org.eclipse.jgit.dircache.DirCacheCheckout.checkout(DirCacheCheckout.java:449)

    at org.eclipse.jgit.api.MergeCommand.call(MergeCommand.java:293)

    ... 10 more

分析:这里是由于别的电脑上,修改了geloushop/.classpath 、geloushop/.project 、 geloushop/.settings/.rebel.xml.bak(你的电脑上可能是xxxx/.classpath  或者别的文件)这三个文件提交到git上面的去了,然后和你本地的起冲突了。

解决办法:如果起冲突的文件是你本地不能被修改的文件 (下面是Eclipse的修改操作,如果是idea,也可以参照这个思路来解决你的问题)

  1、选中上面说的那三个文件(若你看不到这些文件请参考我在网上找的这个网址 ,https://blog.csdn.net/c_z_w/article/details/54906846

 2、按住ctrl 选中三个文件--->右键

3、如图所示的操作

Eclipse git pull文件时出现错误:org.eclipse.jgit.api.errors.CheckoutConflictException:

(这里其实是忽略更新,也就是pull的时候不更新了,就不会起冲突了)

4、重新更新(这个时候就能够成功的pull了)

5、如果帮助到你,请给我留言写个    1