You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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.