Hice git status
y vi un montón de files nuevos, por ejemplo:
Cambios a cometer: (use "git reset HEAD …" para abandonar la escena)
new file: project/swiftFile1.swift new file: projec/swiftFile2.swift Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: project.xcodeproj/project.pbxproj modified: project.xcworkspace/xcuserdata/M.xcuserdatad/UserInterfaceState.xcuserstate Untracked files: (use "git add <file>..." to include in what will be committed) project.xcworkspace/xcuserdata/M.xcuserdatad/WorkspaceSettings.xcsettings
Hice git add -A
y se agregó a git todos los files de arriba, ahora veo allí:
Changes to be committed: (use "git reset HEAD <file>..." to unstage) modified: project.xcodeproj/project.pbxproj modified: project.xcworkspace/xcuserdata/M.xcuserdatad/UserInterfaceState.xcuserstate new file: project.xcworkspace/xcuserdata/M.xcuserdatad/WorkspaceSettings.xcsettings modified: project/Base.lproj/Main.storyboard modified: project/swiftFile1.swift modified: project/swiftFile2.swift
Y luego me di count de que no quiero push
al repository este file:
project.xcworkspace/xcuserdata/M.xcuserdatad/WorkspaceSettings.xcsettings
entonces, antes de hacerlo, ¿qué puedo hacer para dejar de comprometer este file en particular (pero no eliminarlo de mi disco duro)?
Usted tiene la respuesta en su pregunta:
Changes to be committed: (use "git reset HEAD ..." to unstage)
Para dejar de grabar el file, escriba:
git reset HEAD project.xcworkspace/xcuserdata/M.xcuserdatad/WorkspaceSettings.xcsettings
Debo agregar que esto no deshace los cambios que hizo en el file.