In SourceTree, all the existing files are shown as unstaged. I can't discard, remove or reset all. I am not able to pull, push, or commit new changes.
Even if I checkout a new branch or the main branch I am still facing the same problem.
.
This is sometimes a symptom of line ending differences between systems. mac/linux vs Windows. Look up core.autocrlf
If you pulled files or cloned just before this happened, you may want to to change core.autocrlf and start over.
Alternatively, if these file have Windows style (CRLF) endings, and you are on mac or linux, you may want to run the dos2unix utility on all the files.
Either way, learn about core.autocrlf and make sure it is correct for your system.
Sourcetree show all files status in unstaged view, because you have specified 'all files' filter in toolbar:
to fix the "problem" just switch filter to show 'pending files' like this:
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