Xcode 4 プロジェクトのバージョン管理に Git を使用しています。 を明示的に追加しましたProjectFolder.xcodeproj/project.xcworkspace/xcuserdata/myUserName.xcuserdatad/UserInterfaceState.xcuserstate
が.gitignore
、Git はそれを無視しません。なぜそうなるのか、何か考えはありますか?
ベストアンサー1
Git はおそらくすでにファイルを追跡しています。
現在追跡されているファイルの追跡を停止するには、git rm --cachedを使用します。
これを、[project]
およびを[username]
自分の情報に置き換えて使用します:
git rm --cached [project].xcodeproj/project.xcworkspace/xcuserdata/[username].xcuserdatad/UserInterfaceState.xcuserstate
git commit -m "Removed file that shouldn't be tracked"
あるいは、-a
オプションを使用してgit commit
変更または削除されたすべてのファイルを追加します。
ファイルを git から削除すると、 が尊重されます.gitignore
。