Explore Courses Blog Tutorials Interview Questions
0 votes
in DevOps and Agile by (29.3k points)

I'm having an issue with a repository at the moment, and though my Git-fu is usually good, I can't seem to solve this issue.

When I clone this repository, then cd into the repository, git status shows several files as changed. Note: I haven't opened the repository in any editor or anything.

I tried following this guide:, but this didn't help at all with my issue.

I have tried git checkout -- . many times, but it seems not to do anything.

I'm on a Mac, and there are no submodules in the repository itself.

The filesystem is "Journaled HFS+" filesystem on the Mac and is not case-sensitive. The files are one-line and about 79 KB each (yes, you heard right), so looking at git diff isn't particularly helpful. I have heard about doing git config --global core.trustctime false which might help, which I will try when I get back to the computer with the repository on it.

I changed the details of the filesystem with facts! And I tried the git config --global core.trustctime false trick which didn't work very well.

1 Answer

0 votes
by (50.2k points)

For this problem try:

git config --global core.autocrlf input

Even then if it was showing the files are changed then:

Go to .gitattribute file and there you can see something like: 

* text=a

Comment this *text=a. Then the cloning of repositories will work fine.


Browse Categories