0

I want to switch between branches but whenever I try to do that, I always get following message

error: Your local changes to the following files would be overwritten by checkout: Podfile Please commit your changes or stash them before you switch branches.

If I do a git status it looks like

    modified:   Pods/Pods.xcodeproj/xcuserdata/medeiros.xcuserdatad/xcschemes/AlgoliaSearchClient.xcscheme
modified:   Pods/Pods.xcodeproj/xcuserdata/medeiros.xcuserdatad/xcschemes/BoringSSL-GRPC.xcscheme
modified:   Pods/Pods.xcodeproj/xcuserdata/medeiros.xcuserdatad/xcschemes/FWPlayer.xcscheme
modified:   Pods/Pods.xcodeproj/xcuserdata/medeiros.xcuserdatad/xcschemes/Firebase.xcscheme
modified:   Pods/Pods.xcodeproj/xcuserdata/medeiros.xcuserdatad/xcschemes/FirebaseAnalytics.xcscheme

To avoid that, I created a .gitignore file which contains following entries

xcuserdata/

xcuserdata/**/*

!xcuserdata/**/xcschemes/*

*.xcuserstate

Am I missing anything?

Melodias
  • 21
  • 5
  • 2
    Files that are already committed are never ignored. (Technically, it's files that are *tracked* that are not ignored; but files that are in a commit that you tell Git to take out, become tracked.) You'll need to make new, improved commits that *lack* the files. – torek Jun 10 '21 at 13:02

0 Answers0