Git总是告诉我个人文件添加到Xcode。我添加了Objective-C的忽略

时间:2015-12-24 10:10:01

标签: xcode git gitignore

这是git状态:

在分支机构long_10009gitignore上 未提交更改的更改:   (使用" git add ..."更新将要提交的内容)   (使用" git checkout - ..."放弃工作目录中的更改)

  

已修改:Pods / Pods.xcodeproj / xcuserdata / myName.xcuserdatad / xcschemes / xcschememanagement.plist       修改:myCompany.xcworkspace / xcuserdata / myName.xcuserdatad / UserInterfaceState.xcuserstate

没有更改添加到提交(使用" git add"和/或" git commit -a")

我添加了Objective-C的.ignore。为什么git要求我添加上面的文件。  谁知道我该怎么做?

.gitignore的内容:

# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## Build generated
build/
DerivedData

## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata

## Other
*.xccheckout
*.moved-aside
*.xcuserstate
*.xcscmblueprint

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

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md

fastlane/report.xml
fastlane/screenshots

1 个答案:

答案 0 :(得分:0)

如果您想要子目录和文件,最后需要/*

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

编辑完成后,键入git ls-files --other --ignored --exclude-standard以列出此项目中所有被忽略的文件。

您可以确认该命令忽略了什么,如果要撤消提交,请键入 git reset [commit]