1

I have added in .gitignore like this:

Pods/
MyStarhub.xcworkspace/
*/xcuserdata/
DerivedData/*
Podfile.lock
*.DS_Store
*.icloud

But git keeps tracking .Ds_Store Podfile.lock for some reason.

Thao Tran
  • 220
  • 1
  • 2
  • 8

1 Answers1

0

Probably it's because git is still tracking the files you pushed previously. Try:

git rm --cached .DS_Store
git rm --cached Podfile.lock

Or simply delete the files, commit and push

Sebastiaan
  • 980
  • 9
  • 10
  • Thanks for your answer. But when I try it, these 2 files appeared in the "Staged Files" section with the red minus icon. So I still have to commit them right? – Thao Tran Oct 13 '20 at 07:12
  • Yeah, the minus indicates that you are removing them from tracking. – Sebastiaan Oct 23 '20 at 06:18