I started up sourcetree yesterday and found that it was suddenly trying to stage thousands of previously untracked files from directories that are in my .gitignore.
I have no idea what caused this - I haven't made any changes to Sourcetree or my .gitignore file. When I try to select the offending files to ignore them Sourcetree hangs indefinitely.
This is not the first time something like this has happened. Why does Sourcetree randomly decide to disregard my .gitignore? Are there any plans to make the interface remain usable when there are thousands of unstaged files? How can I get Sourcetree to start ignoring these files again?
I was able to remove some of these files with the following command:
git ls-files -c --ignored --exclude-standard -z | xargs -0 git rm --cached
git commit -am "Remove ignored files"
However, there were still thousands of files marked with a purple question mark that I had to remove manually using right click --> Ignore --> Ignore all files under...
Why does Sourcetree not respect my gitignore settings? If I go to Repository Settings --> Advanced --> Repository-specific ignore list --> Edit; it correctly opens my gitignore file - so clearly Sourcetree is aware of the gitignore file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.