开发者

Xcode keeps committing DerivedData folder

How do I remove the DerivedData folder from my Xcode's repo, and how do I permanently preve开发者_JAVA百科nt 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)


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜