Help for git with xCode

0

I have a file xcuserstate that is modified every time I do something in the xCode, it is as follows:

modified:   Proyecto.xcodeproj/project.xcworkspace/xcuserdata/MiNombre.xcuserdatad/UserInterfaceState.xcuserstate

For this to stop happening, I did the following:

git rm --cached *.xcuserstate
git commit -m "Removed cached files"
git push

I work, but then I get this file modified:

Proyecto.xcodeproj/project.xcworkspace/xcuserdata/

When I do the same procedure as the previous one, it gives me this message:

did not match any files

How can I stop so it does not go on? o What files, and how, should I leave out of my version control?

    
asked by albertcito 31.05.2016 в 20:24
source

3 answers

1

To prevent Git from having conflicts with several files that are not necessary and therefore not saved in the repository, it is best to add the following to .gitignore :

#####
# OS X temporary files that should never be committed
.DS_Store
*.swp
*.lock
profile

####
# Xcode temporary files that should never be committed
*~.nib

####
# Objective-C/Swift specific
*.hmap
*.ipa

####
# Xcode build files
DerivedData/
build/
Builds/

#####
# Xcode private settings (window sizes, bookmarks, breakpoints, custom executables, smart groups)
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
!default.pbxuser
!default.mode1v3
!default.mode2v3
!default.perspectivev3

####
# Xcode 4
xcuserdata
!xcschemes
# Xcode 4
*.moved-aside

####
# XCode 4 workspaces - more detailed
!xcshareddata
!default.xcworkspace
*.xcworkspacedata


####
# Xcode 5
*.xccheckout
*.xcuserstate

####
# Xcode 7
*.xcscmblueprint

####
# AppCode
.idea/

####
# Other Xcode files
profile
*.hmap
*.ipa

Also, if you use CocoaPods or Carthage, you can add the following exclusions to the end of the file:

####
# CocoaPods
Pods/

####
# Carthage
Carthage/Build
    
answered by 05.06.2016 / 10:44
source
0

What you can do is erase it as you are doing it so it remains in local, and then add it in a .gitignore file that may be in the root of the project.

    
answered by 01.06.2016 в 15:14
0

As Cristian says, you can add it to the .gitignore. If you go to gitignore.io, you put xcode in the search and you give to generate a .gitignore that will eliminate everything you should not save in git

    
answered by 05.06.2016 в 08:38