Can't unmodify files in git

143 views Asked by At

When I merged with another branch, a few of my files became modified automatically.
I tried to checkout -- on the files, but git status still shows them as modified.

I then tried a custom shell function that normally fixes these kinds of problems for me:

cd `git rev-parse --show-toplevel`;
git reset --hard HEAD && git clean -d -f;
cd -; 
git rm -r --cached .
git reset --hard HEAD

The files still showed up as modified.

I tried running these chunks of commands through different versions of:

git config --global core.autocrlf true
git config --global core.autocrlf false
git config --global core.autocrlf input

The files still show as modified.
I just want a clean git status...

Is there a command that is guaranteed to do this?

0

There are 0 answers