File modified after git clone

After cloning the github repository on my PC, the file appears as a modified file. But the last modification in this file was made 8 months ago. How is this possible? I tried doing "git checkout -." but the file continues as a modified file.

.Gitattribute file:
* .java text
* .scala text
* .xml text
* .properties text
* .properties.default text
* .sh text
* .pig text
* .py text
* .md text

The problem file is the source of java. And I use Ubuntu 12.10

Does anyone have a hint / solution to the problem?

+4
source share
2 answers

just set git core.filemode false will solve your problem.

Br, Tim

0
source

Whenever git checks for a certain file (for example, after clone ), it sets the changed time to the current time.

Consider the following scenario: you have branches creatively called One and Two. You check "One" and do make . Then you select "Two" and run make again. There is a certain file called this, the last time was changed 1 and 2 months ago in the corresponding branch. If git checked file with its original modified time, each time you switch the file branches, it will be changed a long time ago while there will be make . Not a good thing (TM).

-1
source

All Articles