gitignore - How can I ignore specific files from a Git repository? -


this question has answer here:

when use git control team project,this file changed:

myproject.xcodeproj/project.xcworkspace/xcuserdata/user.xcuserdatad/userinterfacestate.xcuserstate

how can ignore file?

when ignoring files git, use .gitignore file in root of repository.

here sample use of ios development project @ work , personal:

# xcode .ds_store build/ *.pbxuser !default.pbxuser *.mode1v3 !default.mode1v3 *.mode2v3 !default.mode2v3 *.perspectivev3 !default.perspectivev3 *.xcworkspace !default.xcworkspace xcuserdata profile *.moved-aside deriveddata *.hmap *.ipa .idea/ # pods - of use cocoapods pods xcuserdata/* 

keep note adding gitignore little of anything. need remove file(s) tracking.

you can with: git rm --cached xcuserdata/* remove being tracked, leave on file system.

for more information on gitignore , how works, recommend reading scm documentation on @ http://git-scm.com/docs/gitignore