没有任何变化,但eclipse egit标记文件已更改 [英] There is nothing changed, but eclipse egit marks the file as changed

查看:152
本文介绍了没有任何变化,但eclipse egit标记文件已更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用eclipse egit和github。我发现一些奇怪的东西,我没有改变任何东西,但egit标记为改变的文件。查看图像:


  1. 文件run.bat被标记为已更改



  2. li>

    与Git索引中的文件相比,你可以看到没有什么不同的

  3. 与HEAD中的文件比较,您可以看到没有任何不同之处

  4. p>


我的朋友使用mac,我使用windows,但我们都将git配置为commit unix lineend..我也检查了我的源代码的行尾和头,他们是相同的(我配置git将它们转换为\r\\\
时拉)



哪里错了?它是一个Egit的bug吗?

解决方案

我在Git中遇到的第一件事情之一。



我已经说过这个了:

  git config --system core.autocrlf false 

要在差异和补丁视图中消除CR突出显示,请使用:

  git config --system core.whitespace cr-at-eol 

如果您与其他人共享您的计算机,请将'--system'替换为'--global'。


I'm using eclipse egit with github. I found something strange that I didn't change anything, but egit marked the file as "changed". See the images:

  1. the file "run.bat" is marked as "changed"

  2. Compare with "file in Git index", you can see nothing is different

  3. Compare with "file in HEAD", you can see nothing is different neither

My friend uses mac and I use windows, but we all configured git as "commit unix lineend".. I also checked the lineend of my source and the HEAD, they are the same(I configured git to convert them to "\r\n" when pulling)

Where is wrong? Is it a bug of Egit?

解决方案

One of the first things I've had issues with in Git.

I've said this forever:

git config --system core.autocrlf false

To get rid of CR highlighting in diff and patch views, use:

git config --system core.whitespace cr-at-eol

If you share your computers with others, replace '--system' with '--global'.

这篇关于没有任何变化,但eclipse egit标记文件已更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆