Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

All the existing files are shown as unstaged files in sourcetree

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.

screen shot.

like image 890
Dheeraj Avatar asked Sep 13 '25 11:09

Dheeraj


2 Answers

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.

like image 91
Randy Leberknight Avatar answered Sep 15 '25 00:09

Randy Leberknight


Sourcetree show all files status in unstaged view, because you have specified 'all files' filter in toolbar:

all files filter

to fix the "problem" just switch filter to show 'pending files' like this:

enter image description here

like image 35
fastobject Avatar answered Sep 15 '25 02:09

fastobject