git show modify files but i don't change anything git reset did not work

git showing file as modified even if it is unchanged
files showing as modified directly after git clone
git diff
git reset --hard still shows modified files
git stash
git diff shows all lines changed
git unstage file
git status --porcelain

I clone repository switch to my branch and when i print git status i see modify files, i try to do git reset --hard but there was no effect :((

git status
On branch release

Changes not staged for commit:

    modified:   htdocs/fonts/OfficinaSansBoldC.eot
    modified:   htdocs/fonts/OfficinaSansBoldC.svg
    modified:   htdocs/fonts/OfficinaSansBoldC.ttf
    modified:   htdocs/fonts/OfficinaSansBoldC.woff
    modified:   htdocs/fonts/OfficinaSansC-Book.eot
    modified:   htdocs/fonts/OfficinaSansC-Book.svg
    modified:   htdocs/fonts/OfficinaSansC-Book.ttf
    modified:   htdocs/fonts/OfficinaSansC-Book.woff

no changes added to commit 

git reset --hard origin/release

git status
On branch release

Changes not staged for commit

    modified:   htdocs/fonts/officinasansboldc.eot
    modified:   htdocs/fonts/officinasansboldc.svg
    modified:   htdocs/fonts/officinasansboldc.ttf
    modified:   htdocs/fonts/officinasansboldc.woff
    modified:   htdocs/fonts/officinasansc-book.eot
    modified:   htdocs/fonts/officinasansc-book.svg
    modified:   htdocs/fonts/officinasansc-book.ttf
    modified:   htdocs/fonts/officinasansc-book.woff

no changes added to commit 

The issue with having a core.autocrlf to input is that it can change eol (end of lines) characters even for (binary) documents that should not be touched.

Try:

git config --global core.autocrlf false
git clone /url/your/repo

(meaning clone again your repo, and see if those diffs are still there)


With git 2.8 (March 2016), you will able to quickly check if those changes are eol-related.

See commit a7630bd (16 Jan 2016) by Torsten Bögershausen (tboegi). (Merged by Junio C Hamano -- gitster -- in commit 05f1539, 03 Feb 2016)

ls-files: add eol diagnostics

When working in a cross-platform environment, a user may want to check if text files are stored normalized in the repository and if .gitattributes are set appropriately.

Make it possible to let Git show the line endings in the index and in the working tree and the effective text/eol attributes.

The end of line ("eolinfo") are shown like this:

"-text"        binary (or with bare CR) file
"none"         text file without any EOL
"lf"           text file with LF
"crlf"         text file with CRLF
"mixed"        text file with mixed line endings.

The effective text/eol attribute is one of these:

"", "-text", "text", "text=auto", "text eol=lf", "text eol=crlf"

git ls-files --eol gives an output like this:

i/none   w/none   attr/text=auto      t/t5100/empty
i/-text  w/-text  attr/-text          t/test-binary-2.png
i/lf     w/lf     attr/text eol=lf    t/t5100/rfc2047-info-0007
i/lf     w/crlf   attr/text eol=crlf  doit.bat
i/mixed  w/mixed  attr/               locale/XX.po

to show what eol convention is used in the data in the index ('i'), and in the working tree ('w'), and what attribute is in effect, for each path that is shown.

Git Showing File as Modified Even if It Is Unchanged, but the files stills are in modified state if you issue another git status. This is a real annoying problem, suppose you want to switch branch with git  To understand if you really have a Line Ending Issue you should run git diff -w command to verify what is really changed in files that git as modified with git status command. The -w options tells

I also met same problem. When i run command git diff, the result is:

Binary files a/app/webroot/font-awesome-4.4.0/fonts/fontawesome-webfont.ttf and b/app/webroot/font-awesome-4.4.0/fonts/fontawesome-webfont.ttf differ
warning: CRLF will be replaced by LF in app/webroot/font-awesome-4.4.0/fonts/fontawesome-webfont.ttf.
The file will have its original line endings in your working directory.

I tried git reset --hard . but it did not work. But when *.ttf binary is appended into .gitattributes file, the reset command worked.

Cheer.

git-status Documentation, This is similar to the short output, but will remain stable across Git versions and regardless of user If -v is specified twice, then also show the changes in the working tree that have not yet Parsers should ignore headers they don't recognize. Git showing file as modified even if it is unchanged This is one annoying problem that happens sometimes to git users: the symptom is: git status command shows you some files as modified (you are sure that you had not modified that files), you revert all changes with a git checkout — .

The reason it does not work is conflicting line ending info passed to git. Try:

git ls-files --eol | grep /path/to/problematic/file

You can add a line to .git/info/attributes file to mitigate the problem. See my answer here for details

Recording Changes to the Repository, As you work, you selectively stage these modified files and then commit all those have a class of files that you don't want Git to automatically add or even show  When I run git status, it shows all files in the branch as up to date and nothing to commit except for a couple of untracked files. When I run git status , in bash on Ubuntu on Windows, it shows what seems to be all of my files as modified and not staged for commit.

modified files not showing up in commit dialog (#911) · Issues , I have many added, modified, and renamed files. 'git status' shows them up fine, but when I try to use TortoiseGit's commit dialog, they just don't show up, so I  In the first article in this series on getting started with Git, we created a simple Git repo and added a file to it by connecting it with our computer. In this article, we will learn a handful of other things about Git, namely how to clone (download), modify, add, and delete files in a Git repo.

git status shows all files as modified · Issue #184 · microsoft/WSL , When I run git status, it shows all files in the branch as up to date and on git for Windows, I don't recommend changing the --global setting. In the upper right corner of the file view, click to open the file editor. On the Edit file tab, make any changes you need to the file. Above the new content, click Preview changes . At the bottom of the page, type a short, meaningful commit message that describes the change you made to the file.

Become a Git pro in just one blog. A thorough guide to Git , Using Git, many developers can make changes to the same code base at the But we don't want to add one file at a time, what if we have thousands of files? git log will show you the commit hash, the author and the commit  My co-worker pointed me to the .git/info/exclude file which, much like a .gitignore file, allows you to ignore files from being staged.This keeps things nice and clean, and the best part is that

Comments
  • See git clean -df.
  • Please explain your question in the body.
  • git clean -df did't help
  • In your question, you write autoclrf, but the correct key is core.autocrlf (note that "r" and "l" are swapped). Is that a typo in your question or in your config file? Did you edit your config file manually?
  • I have problem with modified files and i print my .git/config core options for more understanding my situation
  • this helped me, I didn't have to clone the repo again
  • For me also helped adding *.svg binary to .gitattributes and doing reset --hard. Weird.
  • I needed to commit the .gitattributes diff and remove and add the .ttf file in order for this to work with git version 2.21.0 (Apple Git-120).