gitがルールを無視して、ファイルがソリューション.gitignore有効になりません。

テキスト

  • Gitはルールを無視します:

#これはコメントです- Gitの内容は無視され
.sample#は.sampleを終わるすべてのファイルを無視
!lib.sample除くLib.sampleの#
TODOファイルの下で/ TODO#だけではないサブディレクトリ/ TODOを含め、プロジェクトのルートディレクトリを無視する
ビルド/#をビルド/ディレクトリ内のすべてのファイルを無視
DOC /
.txtの#は、doc / notes.txtをを無視するが、ドキュメント/サーバー/ arch.txtを除きます

  • ソリューション.gitignoreルールは有効ではありません
    上記のような発見が有効になりませんでした後に.gitignoreはファイルのみを無視するので、定義された、ルールを無視する追加、特定のディレクトリやファイルへのいくつかのファイルが含まれている場合は、追跡されていませんでしたバージョン管理は、.gitignoreが無効で変更します。その後、溶液は、最初の(状態の変化を追跡していない)ローカルキャッシュを削除することで、その後に提出します:
git rm -r --cached .
git add . git commit -m 'update .gitignore' 

以下は、コンテンツのiOSの一例である.gitignore

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

## Build generated
build/
DerivedData/ ## Various settings *.xcuserstate *.DS_Store *.pbxuser !default.pbxuser *.mode1v3 !default.mode1v3 *.mode2v3 !default.mode2v3 *.perspectivev3 !default.perspectivev3 xcuserdata/ ## Other *.moved-aside *.xccheckout *.xcscmblueprint ## Obj-C/Swift specific *.hmap *.ipa *.dSYM.zip *.dSYM # 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://docs.fastlane.tools/best-practices/source-control/#source-control fastlane/report.xml fastlane/Preview.html fastlane/screenshots fastlane/test_output # Code Injection # # After new code Injection tools there's a generated folder /iOSInjectionProject # https://github.com/johnno1962/injectionforxcode iOSInjectionProject/

出典:ジェーンの本は
、著者が著作権を保有しています。著者は認可商業転載してください接触、非商用の転載は、ソースを明記してください。

おすすめ

転載: www.cnblogs.com/qingfenglin/p/12620393.html