2

我目前正在使用版本控制 Git + SourceTree 处理 iOS 项目。我有一个问题,当我更改图像集的名称(在 Assets.xcassets 文件夹内)时,Git 没有被标记为未暂存文件(脏文件)。例如,将名称从 更改icon.imageseticon_new.imageset。但是,如果我添加新的图像集,Git 现在会识别这个新添加的文件并标记为未暂存,当然,它也允许我提交它。

我在这里附上了我的ignore file. 我不太确定这是原因还是 Xcode 的错误。希望任何人都可以提供一些提示或解决方案,以便我可以继续重命名我的所有图像集。

# 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.

fastlane/report.xml
fastlane/screenshots

更新1: 调用后git status --ignored,我得到以下结果。

.DS_Store
    SwiftTestProject/.DS_Store
    SwiftTestProject/Pods/.DS_Store
    SwiftTestProject/Pods/Alamofire/Source/NetworkReachabilityManager.swift
    SwiftTestProject/Pods/Alamofire/Source/Notifications.swift
    SwiftTestProject/Pods/Alamofire/Source/Timeline.swift
    SwiftTestProject/Pods/DeviceKit/
    SwiftTestProject/Pods/Google/
    SwiftTestProject/Pods/GoogleAnalytics/
    SwiftTestProject/Pods/GoogleInterchangeUtilities/
    SwiftTestProject/Pods/GoogleNetworkingUtilities/
    SwiftTestProject/Pods/GoogleSymbolUtilities/
    SwiftTestProject/Pods/GoogleUtilities/
    SwiftTestProject/Pods/Headers/
    SwiftTestProject/Pods/ObjectMapper/ObjectMapper/Core/Mappable.swift
    SwiftTestProject/Pods/Pods.xcodeproj/xcuserdata/hsuan.xcuserdatad/xcschemes/DeviceKit.xcscheme
    SwiftTestProject/Pods/Pods.xcodeproj/xcuserdata/hsuan.xcuserdatad/xcschemes/QRCode.xcscheme
    SwiftTestProject/Pods/QRCode/
    SwiftTestProject/Pods/SQLite.swift/SQLite/
    SwiftTestProject/Pods/SQLite.swift/podstuff/
    SwiftTestProject/Pods/Target Support Files/
    SwiftTestProject/SwiftTestProject.xcworkspace/xcuserdata/
    SwiftTestProject/SwiftTestProject/.DS_Store
    SwiftTestProject/SwiftTestProject/Assets.xcassets/.DS_Store
    SwiftTestProject/SwiftTestProject/Base.lproj/.DS_Store
    SwiftTestProject/SwiftTestProject/BaseClass/.DS_Store
    SwiftTestProject/SwiftTestProject/DBHandler/.DS_Store
    SwiftTestProject/SwiftTestProject/DataObjects/.DS_Store
    SwiftTestProject/SwiftTestProject/DataObjects/CustomedTransform/.DS_Store
    SwiftTestProject/SwiftTestProject/Login/
    SwiftTestProject/SwiftTestProject/Utilities/.DS_Store
    SwiftTestProject/SwiftTestProject/VppViewController/.DS_Store
    SwiftTestProject/SwiftTestProject/WebAPI/.DS_Store
    SwiftTestProject/SwiftTestProject/.DS_Store

是否行

iBonSwift/iBonSwift/Assets.xcassets/.DS_Store

造成问题?

4

0 回答 0