打開項目目錄下.gitignore文件,添加進去就可以了.(如果之前項目中已經(jīng)有UserInterfaceState.xcuserstate
文件,需要手動刪除:在關(guān)閉xcode下,找到目錄下,手動刪除)
# Xcode
.DS_Store
*/build/*
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
profile
*.moved-aside
DerivedData
.idea/
*.hmap
*.xccheckout
*.xcworkspace
!default.xcworkspace
UserInterfaceState.xcuserstate
*.xcuserstate`
#CocoaPods
Pods
!Podfile
!Podfile.lock