Xcode keeps committing DerivedData folder
How do I remove the DerivedData folder from my Xcode’s repo, and how do I permanently prevent it from including it in the commits?
Xcode 3 didn’t have this problem. Started with Xcode 4.1.
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch DerivedData/' (for folders)
git filter-branch --index-filter 'git rm --cached --ignore-unmatch filename_here' (for files)
2 Solutions collect form web for “Xcode keeps committing DerivedData folder”
If you want to remove the folder from your previous history you can follow Github’s guide to removing sensitive data.
If you just want to remove it from here on out, you can remove it from the repo with
git rm -r --cached folderName/
Then, add the following line to a file called
.gitignore in your root directory
Where is your derived data repo? It’s usually on ~/Library/Developer/Xcode/DerivedData
It shouldn’t automatically get committed unless you override this default location.