I did some work on a project on one machine, then pushed to github and, on another machine, cloned and did some work, then pushed. Then I went back to the first machine and did a pull
. Now the first machine thinks all the files that were in the project originally were changed. I've tried
git checkout -f --
and
git rm --cached -r .
git checkout -f
and even tried
git stash
but no matter what I do, git status
tells me those files have been changed. How do I make it stop?
This seems to be a line-ending/autocrlf issue. A great trick I realized for fixing this (if your index doesn't matter) is:
$ git add -u .
$ git reset .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With