Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode keeps committing DerivedData folder

Tags:

git

xcode4

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.

Solution

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)

like image 228
AWF4vk Avatar asked Aug 05 '11 02:08

AWF4vk


People also ask

How do you clean DerivedData?

Delete Derived DataChoose Window -> Organizer. Select the Projects tab. Select your project on the left. Next to the Derived Data line, there click the Delete button.

What is DerivedData?

Derived data is new data created by combining and processing existing raw data. Derived data can be created from observational, experimental, and simulation data – but not previously derived data.

How do I clear derived data Xcode 13?

Using Mac Finder b) Go to the Xcode -> Location, Go to derived data and click the arrow which will take you to the derived data folder. Go to Developer -> Xcode -> Derived Data and feel free to delete the contents of the derived data folder.


1 Answers

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
folderName

like image 197
Andy Avatar answered Sep 22 '22 05:09

Andy