Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.5k views
in Technique[技术] by (71.8m points)

git - There is nothing changed, but eclipse egit marks the file as changed

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"

    enter image description here

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

    enter image description here

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

    enter image description here

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 " " when pulling)

Where is wrong? Is it a bug of Egit?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Eclipse Preferences / Team / Git / Configuration / User Settings

("core" section)

key: autocrlf
value: false

The key should already exist, so just need to edit the value.

If creating a new key then use core.autocrlf.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...