简体   繁体   English

没有文件更改,但是Git Eclipse项目浏览器指示有

[英]No files changed but Git Eclipse project explorer indicates there are

Eclipse indicates I have files changed under my project root folder, but clearly there aren't any. Eclipse指示我的项目根文件夹下的文件已更改,但显然没有任何文件。 To help you see the issue I've attached a screen shot below 为了帮助您查看问题,我在下面附上了一个屏幕截图

在此处输入图片说明

See that > mark next to my project root folder? 看到>我的项目根文件夹旁边的标记? That indicates I have changed files, but none of the sub-folders have that mark. 这表明我已经更改了文件,但是所有子文件夹都没有该标记。 This is important because now it does not let me switch to another branch unless the changes are committed. 这很重要,因为除非更改已提交,否则现在不允许我切换到另一个分支。

Here's the steps to reproduce my problem (at least how it happened on my machine): 以下是重现我的问题的步骤(至少在我的计算机上是如何发生的):

  1. I was originally in my local branch which is a clone of remote origin/develop branch. 我最初在本地分支机构中,该分支机构是远程起源/开发分支机构的克隆。
  2. I created a new feature branch and checked it out. 我创建了一个新的功能分支并将其签出。
  3. Worked on some features, then committed the changes to origin/develop branch. 曾参与开发了一些功能,然后提交更改原产地/开发分支。
  4. Switched back to my local develop branch (where I was at in the beginning). 切换回我的本地开发分支(我刚开始的地方)。 Only to find out that the files I've changed in the feature branch are all marked as changed by the > mark, but if I look into the files they are identical to the remote origin/develop branch that I cloned off before - NOT CHANGED. 只是发现我在功能分支中更改过的文件都已用>标记标记为已更改,但是如果我查看这些文件,则它们与我之前克隆的远程Origin / develop分支相同-未更改。
  5. Now it does not allow me to checkout other branches unless I commit these "changed files". 现在,除非我提交这些“更改的文件”,否则它不允许我检出其他分支。 So I did a hard reset on it, but still the marks are there and eclipse won't let me switch branch. 所以我对其进行了硬重置,但是标记仍然存在,并且日食不会让我切换分支。
  6. I got mad, did a pull from origin/develop. 我生气了,的确从产地 /发展。 Then finally all > marks are gone except for the one pointing to my project root folder. 然后最后所有的>标记都消失了, 除了一个指向我的项目根文件夹的标记。
  7. If I switch to the feature branch I worked on again and then switch back to local develop, everything goes back to step 4 . 如果我再次切换功能分支 ,然后又切换本地开发,一切将回到步骤4

Is this an Eclipse related issue? 这是与Eclipse相关的问题吗? Or is there something I did wrong? 还是我做错了什么? Please help, I'm lost! 请帮助,我迷路了!

As i can see from your image there is one untracked file in your project thats why you are getting > sign on root of your project. 正如我从您的图像中看到的那样,您的项目中有一个未跟踪的文件,这就是为什么要获取>在项目的根目录上签名。

To clean it: 清洁它:

  1. Open Git Repository View in eclipse. 在Eclipse中打开Git存储库视图。
  2. Right Click select clean 右键单击选择清洁
  3. Select all the files and choose Finish 选择所有文件,然后选择完成

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM