Xcode ව්‍යාපෘති සඳහා Git නොසලකා හරින්න


887

Xcode සමඟ ඒකාබද්ධව Git.gitignore භාවිතා කරන විට මා ඇතුළත් කළ යුතු ගොනු මොනවාද?


11
පරීක්ෂා කරන්නhttps://www.gitignore.io/api/swift,xcode,Cobjective-c,osx
thesummersign

ඉහත සබැඳිය මඟින් දෝෂයක් ඇති කරයි: gitignore.io/api/swift,xcode,objective-c,osx
පූජ්‍ය

Answers:


694

මම මීට පෙර ඉහළම ඡන්දය දුන් පිළිතුර භාවිතා කළෙමි, නමුත් එයට ටිකක් පිරිසිදු කිරීම අවශ්‍ය වේ, එබැවින් මෙහි එය Xcode 4 සඳහා නැවත සකස් කර ඇත, සමහර වැඩිදියුණු කිරීම් සමඟ.

මම මෙම ලැයිස්තුවේ ඇති සෑම ගොනුවක්ම පර්යේෂණය කර ඇත, නමුත් ඒවායින් කිහිපයක් ඇපල් හි නිල Xcode ප්‍රලේඛනයේ නොමැත, එබැවින් මට ඇපල් තැපැල් ලැයිස්තුවට යාමට සිදු විය.

ඇපල් විසින් ලේඛනගත නොකළ ලිපිගොනු එකතු කරමින් අපගේ සජීවී ව්‍යාපෘති දූෂිත විය හැකිය. මෙම IMHO පිළිගත නොහැකි අතර, ඔවුන් එසේ කරන සෑම අවස්ථාවකම මම එයට එරෙහිව දෝෂ සටහන් කිරීමට පටන් ගතිමි. ඔවුන් එය ගණන් නොගන්නා බව මම දනිමි, නමුත් සමහර විට එය සංවර්ධකයින්ට වඩාත් සාධාරණ ලෙස සැලකීමට ලැජ්ජාවට පත් වනු ඇත.


ඔබට අභිරුචිකරණය කිරීමට අවශ්‍ය නම්, ඔබට කළ හැකි සාරාංශයක් මෙන්න: https://gist.github.com/3786883


#########################
# .gitignore file for Xcode4 and Xcode5 Source projects
#
# Apple bugs, waiting for Apple to fix/respond:
#
#    15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation?
#
# Version 2.6
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#
# 2015 updates:
# - Fixed typo in "xccheckout" line - thanks to @lyck for pointing it out!
# - Fixed the .idea optional ignore. Thanks to @hashier for pointing this out
# - Finally added "xccheckout" to the ignore. Apple still refuses to answer support requests about this, but in practice it seems you should ignore it.
# - minor tweaks from Jona and Coeur (slightly more precise xc* filtering/names)
# 2014 updates:
# - appended non-standard items DISABLED by default (uncomment if you use those tools)
# - removed the edit that an SO.com moderator made without bothering to ask me
# - researched CocoaPods .lock more carefully, thanks to Gokhan Celiker
# 2013 updates:
# - fixed the broken "save personal Schemes"
# - added line-by-line explanations for EVERYTHING (some were missing)
#
# NB: if you are storing "built" products, this WILL NOT WORK,
# and you should use a different .gitignore (or none at all)
# This file is for SOURCE projects, where there are many extra
# files that we want to exclude
#
#########################

#####
# OS X temporary files that should never be committed
#
# c.f. http://www.westwind.com/reference/os-x/invisibles.html

.DS_Store

# c.f. http://www.westwind.com/reference/os-x/invisibles.html

.Trashes

# c.f. http://www.westwind.com/reference/os-x/invisibles.html

*.swp

#
# *.lock - this is used and abused by many editors for many different things.
#    For the main ones I use (e.g. Eclipse), it should be excluded
#    from source-control, but YMMV.
#   (lock files are usually local-only file-synchronization on the local FS that should NOT go in git)
# c.f. the "OPTIONAL" section at bottom though, for tool-specific variations!
#
# In particular, if you're using CocoaPods, you'll want to comment-out this line:
*.lock


#
# profile - REMOVED temporarily (on double-checking, I can't find it in OS X docs?)
#profile


####
# Xcode temporary files that should never be committed
# 
# NB: NIB/XIB files still exist even on Storyboard projects, so we want this...

*~.nib


####
# Xcode build files -
#
# NB: slash on the end, so we only remove the FOLDER, not any files that were badly named "DerivedData"

DerivedData/

# NB: slash on the end, so we only remove the FOLDER, not any files that were badly named "build"

build/


#####
# Xcode private settings (window sizes, bookmarks, breakpoints, custom executables, smart groups)
#
# This is complicated:
#
# SOMETIMES you need to put this file in version control.
# Apple designed it poorly - if you use "custom executables", they are
#  saved in this file.
# 99% of projects do NOT use those, so they do NOT want to version control this file.
#  ..but if you're in the 1%, comment out the line "*.pbxuser"

# .pbxuser: http://lists.apple.com/archives/xcode-users/2004/Jan/msg00193.html

*.pbxuser

# .mode1v3: http://lists.apple.com/archives/xcode-users/2007/Oct/msg00465.html

*.mode1v3

# .mode2v3: http://lists.apple.com/archives/xcode-users/2007/Oct/msg00465.html

*.mode2v3

# .perspectivev3: http://stackoverflow.com/questions/5223297/xcode-projects-what-is-a-perspectivev3-file

*.perspectivev3

#    NB: also, whitelist the default ones, some projects need to use these
!default.pbxuser
!default.mode1v3
!default.mode2v3
!default.perspectivev3


####
# Xcode 4 - semi-personal settings
#
# Apple Shared data that Apple put in the wrong folder
# c.f. http://stackoverflow.com/a/19260712/153422
#     FROM ANSWER: Apple says "don't ignore it"
#     FROM COMMENTS: Apple is wrong; Apple code is too buggy to trust; there are no known negative side-effects to ignoring Apple's unofficial advice and instead doing the thing that actively fixes bugs in Xcode
# Up to you, but ... current advice: ignore it.
*.xccheckout

#
#
# OPTION 1: ---------------------------------
#     throw away ALL personal settings (including custom schemes!
#     - unless they are "shared")
# As per build/ and DerivedData/, this ought to have a trailing slash
#
# NB: this is exclusive with OPTION 2 below
xcuserdata/

# OPTION 2: ---------------------------------
#     get rid of ALL personal settings, but KEEP SOME OF THEM
#     - NB: you must manually uncomment the bits you want to keep
#
# NB: this *requires* git v1.8.2 or above; you may need to upgrade to latest OS X,
#    or manually install git over the top of the OS X version
# NB: this is exclusive with OPTION 1 above
#
#xcuserdata/**/*

#     (requires option 2 above): Personal Schemes
#
#!xcuserdata/**/xcschemes/*

####
# Xcode 4 workspaces - more detailed
#
# Workspaces are important! They are a core feature of Xcode - don't exclude them :)
#
# Workspace layout is quite spammy. For reference:
#
# /(root)/
#   /(project-name).xcodeproj/
#     project.pbxproj
#     /project.xcworkspace/
#       contents.xcworkspacedata
#       /xcuserdata/
#         /(your name)/xcuserdatad/
#           UserInterfaceState.xcuserstate
#     /xcshareddata/
#       /xcschemes/
#         (shared scheme name).xcscheme
#     /xcuserdata/
#       /(your name)/xcuserdatad/
#         (private scheme).xcscheme
#         xcschememanagement.plist
#
#

####
# Xcode 4 - Deprecated classes
#
# Allegedly, if you manually "deprecate" your classes, they get moved here.
#
# We're using source-control, so this is a "feature" that we do not want!

*.moved-aside

####
# OPTIONAL: Some well-known tools that people use side-by-side with Xcode / iOS development
#
# NB: I'd rather not include these here, but gitignore's design is weak and doesn't allow
#     modular gitignore: you have to put EVERYTHING in one file.
#
# COCOAPODS:
#
# c.f. http://guides.cocoapods.org/using/using-cocoapods.html#what-is-a-podfilelock
# c.f. http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
#
#!Podfile.lock
#
# RUBY:
#
# c.f. http://yehudakatz.com/2010/12/16/clarifying-the-roles-of-the-gemspec-and-gemfile/
#
#!Gemfile.lock
#
# IDEA:
#
# c.f. https://www.jetbrains.com/objc/help/managing-projects-under-version-control.html?search=workspace.xml
# 
#.idea/workspace.xml
#
# TEXTMATE:
#
# -- UNVERIFIED: c.f. http://stackoverflow.com/a/50283/153422
#
#tm_build_errors

####
# UNKNOWN: recommended by others, but I can't discover what these files are
#

63
ඔබ නොසලකා හරිමින් නොකළ යුතුය *.lockහෝ Podfile.lock(අතිරික්තතාව කමක් නැහැ). සියලුම වැඩබිම්වල එකම අනුවාදයන් ස්ථාපනය කිරීමට ඔබට අවශ්‍යය, ඔබට "නවතම අනුවාදය" අවශ්‍ය නොවේ.
tvon

8
මම පොඩ්ෆයිල් කොටස ඉවත් කර ඇත. මම මුලින් එය එකතු කළේ නැත, SO පවසන්නේ වෙනත් අයෙකු එය එකතු කළ බවත් මම නොසැලකිලිමත් ලෙස එය සාරාංශයට පිටපත් කර අලවා ඇති බවත්ය. ඕනෑම / සියලු ව්‍යාකූලතා සහ වරදවා වටහාගැනීම් සඳහා මගේ සමාව. ඔබේ පිළිතුරු සංස්කරණය කිරීමට ඕනෑම කෙනෙකුට ස්ටැක් ඕවර්ෆ්ලෝ ඉඩ දෙන ආකාරයට මම අකමැතියි :(.
ඇඩම්

6
සෑම දෙයක්ම සඳහා පැහැදිලි කිරීමේ රේඛාවක් දැන් ඇත, පේළියකින්. මෙය වඩාත් පැහැදිලි කළ යුතු අතර ඔබේම ව්‍යාපෘති සඳහා රිසිකරණය කිරීම පහසු කරයි.
ආදම්

3
D ඇඩම් මට පෙනෙන පරිදි, මෙම ගොනුවේ VCS පාර-දත්ත අඩංගු වන අතර එම නිසා VCS වෙත පරීක්ෂා නොකළ යුතුය. නැහැ, නැහැ, නැහැ මත සඳහන් developer.apple.comගැන xccheckout. නමුත් නිල ගිතුබ් පිටුවේ, මෙම ගොනුව දැනටමත් gitignore ගොනුවට ඇතුළත් කර ඇත. https://github.com/github/gitignore/blob/master/Objective-C.gitignore
skywinder

3
නිල විස්තරයක් නොමැතිව, අපි කිසිවක් නොසලකා හැරීමට යන්නේ නැත. මිනිසුන් එය කළ සෑම අවස්ථාවකම පාහේ, එය ඉක්මනින් හෝ පසුව යමෙකුගේ ව්‍යාපෘතිය දූෂිත කරයි. මාර්ගය ඉතා භයානකයි - එහි නොයන්න. එබැවින් නොසලකා හැරීම ආරක්ෂිත බව සනාථ කරන සත්‍යාපිත ප්‍රභවයක් මා සතුව නොමැති නම් මෙම ගොනුවට කිසිවක් එකතු කිරීම මම ප්‍රතික්ෂේප කරමි!
ඇඩම්

276

මර්කුරියල් සඳහා මෙම මාර්ගෝපදේශය මත පදනම්ව මගේ .gitignore ට ඇතුළත් වන්නේ:

.DS_Store
*.swp
*~.nib

build/

*.pbxuser
*.perspective
*.perspectivev3

ඇතුළත් කිරීමට මම තෝරාගෙන ඇත:

*.mode1v3
*.mode2v3

ඒවා, මෙම ඇපල් තැපැල් ලැයිස්තු සටහනට අනුව , "පරිශීලක-විශේෂිත ව්‍යාපෘති සැකසුම්" වේ.

සහ Xcode 4 සඳහා:

xcuserdata

52
.Pbxuser / .persspect / *. ඉදිරිදර්ශන 3 රටාවන්ට මම විශේෂයෙන් කැමති නැත . මම පහත දැක්වෙන .xcodeproj / ! *. Xcodeproj / project.pbxproj ප්‍රොජෙක්ට් .pbxproj හැර * .xcodeproj තුළ ඇති සියල්ල නොසලකා හරිනවා.
ලිලී බැලාර්ඩ්

5
මම * .pbxuser, * .persspect සහ * .persspv3 නොසලකා හරිනුයේ මගේ ගබඩාව ක්ලෝන කරන විට එම සැකසුම් නැවත තබා ගැනීමට මා කැමති බැවිනි.
lajos

7
ඔබට මෙවැනි "ගෝලීය" ගිටිග්නෝර් ගොනුවක් සෑදිය හැකි බව එකතු කිරීමට ඔබට අවශ්‍ය විය හැකිය: git config --global core.excludesfile ~ / .gitignore
ජෙස් බෝවර්ස්

63
ව්‍යාපෘතිය සිදු කළ පසු .gitignore ගොනුව එකතු කළ සෑම කෙනෙකුටම අවවාද කිරීමට මම කැමතියි : ඔබ නොසලකා හරින ලද ගොනු තවමත් ලුහුබඳිමින් සිටී. ඔබට ඒවා අතින් භාවිතයෙන් ඉවත් කිරීමට git rm --cached <files>
සිදුවේ

21
PSpacyRicochet: මා අදහස් දැක්වීම ලිවූ දා සිට අදහස් ආකෘතිකරණය වෙනස් වී ඇත. එබැවින් ඇල අකුරු. මගේ රටාව * .xcodeproj / *! * ලෙස පෙනේ. Xcodeproj / project.pbxproj. ඇත්ත වශයෙන්ම, මේ දිනවල ඔබ වැඩබිම් සඳහා එය සකස් කළ යුතුය.
ලිලී බැලාර්ඩ්

65

'බිල්ඩ්' නාමාවලිය බැහැර කිරීම සම්බන්ධයෙන් -

මා විසින් සාදන ලද ලිපිගොනු ඔබේ මූලාශ්‍රයට වඩා වෙනස් නාමාවලියක තැබුවහොත්, ඔබට කරදර වීමට ෆෝල්ඩරය ගසෙහි නොමැත.

මෙය ඔබගේ කේතය බෙදාගැනීම, පුපුරා ගිය උපස්ථයන් වළක්වා ගැනීම සහ වෙනත් Xcode ව්‍යාපෘති සඳහා යැපීම් ඇති විටදී පවා ජීවිතය සරල කරයි (ගොඩනැගිලි එකිනෙකට සමාන නාමාවලියක තිබිය යුතු අතර)

ගිතුබ් සාරාංශය වෙතින් ඔබට යාවත්කාලීන පිටපතක් ලබා ගත හැකිය https://gist.github.com/708713

මගේ වර්තමාන .gitignore ගොනුව

# Mac OS X
*.DS_Store

# Xcode
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
*.xcuserstate
project.xcworkspace/
xcuserdata/

# Generated files
*.o
*.pyc


#Python modules
MANIFEST
dist/
build/

# Backup files
*~.nib

7
මට ව්‍යාපෘති ෆෝල්ඩරයෙන් පිටත බිල්ඩ් ෆෝල්ඩරය ඇත, නමුත් අනෙක් පරිශීලකයින් ව්‍යාපෘතිය ගොඩනඟන විට එය පෙරනිමියෙන් ව්‍යාපෘතියේ ප්‍රතිනිර්මාණය වේ- එබැවින් නොසලකා හරින ලද ගොනුවට එය එකතු කිරීම වඩා හොඳ විසඳුමක් බව මට පෙනී ගියේය, එසේ නොමැති නම් එය ඒවායේ කියවනු ලැබේ කරයි.
lajos

58

Xcode 4 සඳහා මම ද එකතු කරමි:

YourProjectName.xcodeproj/xcuserdata/*
YourProjectName.xcodeproj/project.xcworkspace/xcuserdata/*

78
ඔබ එකතු කළහොත් xcuserdata, එය දෙකම බලා ගනී.
ma11hew28

7
කිසියම් හේතුවක් නිසා උපසර්ගය නොමැතිව xcuserdata එකතු කිරීම මට වැඩ කළේ නැත. මම හිතුවා ඒක වෙන්න ඕනේ කියලා. අමුතුයි.
බැස්ටිබෙන්

24

මම මෙම යෝජනා ගිතුබ් හි නිර්මාණය කළ සාරාංශයක ඇතුළත් කළෙමි: http://gist.github.com/137348

එය දෙබලක කිරීමට නිදහස්ව සිටින්න, එය වඩා හොඳ කරන්න.


5
එසේම ගිතුබ් යාලුවෙක් .gitignore ගොනු කිහිපයක් එකතු කර ඇත. මෙන්න පරමාර්ථ-සී විශේෂිත එක- github.com/github/gitignore/blob/master/Objective-C.gitignore
program247365

ද Thoughtbot ජනයා මෙම ව්යාපෘතිය සමග පැමිණි - github.com/thoughtbot/liftoff වූ සිහිකල්පනාව පෙරනිමි .gitignore ගොනු එකතු වනු ඇත, එය මත ඔවුන්ගේ බ්ලොග් බලන්න: robots.thoughtbot.com/post/33796217972/...
program247365

15

ඔබ Objective-C සහ Swift සඳහා gitignore.io පරීක්ෂා කළ යුතුය .

මෙන්න .gitignoreමම භාවිතා කරන ගොනුව:

# Xcode
.DS_Store
*/build/*
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
profile
*.moved-aside
DerivedData
.idea/
*.hmap
*.xccheckout
*.xcworkspace
!default.xcworkspace

#CocoaPods
Pods

1
සෑම විටම ඔබේ ආදර්ශය භාවිතා කරන්න. ලස්සන සැකසුම්! ස්තූතියි!
නිකොලායි ෂුබෙන්කොව්

මම කාලයක් තිස්සේ gitignore.io භාවිතා කර නැත - ඔබ නොමැති දැයි පරීක්ෂා කිරීම වටී. ඔබ භාවිතා gitignoreකරන ඕනෑම IDE / භාෂාව සඳහා ගොනුවක් සෑදීමට ඔබට එය භාවිතා කළ හැකිය . එය කොකෝපොඩ් කොටසක් පවා එකතු කරයි. දීප්තිමත්
ෂ්ලි මිල්ස්

14

GitHub හි පුද්ගලයින් එක්ස්කෝඩ් ව්‍යාපෘති සඳහා පරිපූර්ණ හා ලේඛනගත .gitignore ගොනු ඇත:

ස්විෆ්ට්: https://github.com/github/gitignore/blob/master/Swift.gitignore

පරමාර්ථ-සී: https://github.com/github/gitignore/blob/master/Objective-C.gitignore


5
මෙය දැනටමත් ඉහත එක් පිළිතුරකට පළ කර ඇත. එය එසේ බව මට පෙනී ගියේය: වැරදි, සැක සහිත සහය (කැපී පෙනෙන ඉල්ලීම් 100 කට වඩා!), සහ ලේඛනගත නොකළ. එය "වැරදියි" යන කාරණය සියල්ලටම වඩා නරකම ය; ඔවුන් නොසලකා හැර ඇත්තේ පටු භාවිතයන් සඳහා පමණක් වන අතර කුමක් හෝ ඇයි යන්න පැහැදිලි කර නැත! එබැවින්: ඉහත මගේ පිළිතුර, ඔවුන්ගේ දෝෂ නිවැරදි කරන අතර සිදු කරන්නේ කුමක්ද සහ ඇයි යන්න පැහැදිලි කරයි, එබැවින් ඔබට ව්‍යාපෘති අනුව ව්‍යාපෘති පදනමක් මත උගත් තීරණ ගත හැකිය (නව ව්‍යාපෘතියක, සමහර අයිතම එහි ඇත්තේ මන්දැයි මට සමහර විට අමතක වේ - අදහස් මට තීරණය කිරීමට උපකාරී වේ :))
ඇඩම්

D ඇඩම්: GitHub's .gitignoreදැන් Xcode 6.3.2 සහ Swift සඳහා යාවත්කාලීන කර ඇත, එබැවින් එය දැන් නිවැරදි ය. එය ද ලේඛනගත කර ඇත.
එරික්

ඔව්, නමුත් දත්ත විනාශකාරී ගොනුවක් ප්‍රකාශයට පත් කිරීම සහ එය මාස හෝ අවුරුදු ගණනක් තබා ගැනීම - සහ පෙනෙන පරිදි එය නිසි ලෙස පරික්ෂා කිරීමට කරදර නොවීම - ඔබ ප්‍රජාවෙන් සියලු විශ්වාසය, විශ්වාසය, ගෞරවය ස්ථිරවම පරිත්‍යාග කිරීමයි. ගොඩක් ප්රමාදයි.
ඇඩම්

12

මම AppCode සහ XCode යන දෙකම භාවිතා කරමි. නිසා.idea/ නොසලකා හැරිය යුතුය.

මෙය ආදම්ට එකතු කරන්න .gitignore

####
# AppCode
.idea/

10

එක්ස්. විනෝද වන්න!

Xcode-Git-User-Script

වගකීම් නැත ... මම මෙයින් බොහොමයක් උරා බොමි - එබැවින් ඔබේම අනතුරේ භාවිතා කරන්න


10

සඳහා .gitignore ගොනුවක් එකතු කිරීම

මැක් ඕඑස් එක්ස් + එක්ස්කෝඩ් + ස්විෆ්ට්

මගේ ස්විෆ්ට් ව්‍යාපෘතියට .gitignore ගොනුවක් එක් කළ ආකාරය මෙයයි:

  1. ඔබ Xcode හි ප්‍රොජෙක්ට් තෝරන්න සහ දකුණු ක්ලික් කරන්න → නව කණ්ඩායම → නම් කරන්න “ Git ” ලෙස නම් කරන්න
  2. Git ෆෝල්ඩරය තෝරන්න සහ දකුණු ක්ලික් කරන්න කරන්න new නව ගොනුවක් එක් කරන්න
  3. තුළ , iOS ටැබ් → තෝරා වෙනත්හිස් ගොනුවක්

රූප විස්තරය මෙහි ඇතුළත් කරන්න

  1. ගොනුවේ නම මෙහි " .gitignore " දෙන්න

රූප විස්තරය මෙහි ඇතුළත් කරන්න

  1. ගොනුවේ නම තහවුරු කර ටයිප් කරන්න

රූප විස්තරය මෙහි ඇතුළත් කරන්න

ප්‍රති result ල ව්‍යුහය මෙන්න:

රූප විස්තරය මෙහි ඇතුළත් කරන්න

  1. ගොනුව විවෘත කර පහත කේතය පසු කරන්න

# file

#########################################################################
#                                                                       #
#       Title         - .gitignore file                                 #
#       For           - Mac OS X, Xcode 7 and Swift Source projects     #
#       Updated by    - Ramdhan Choudhary                               #
#       Updated on    - 13 - November - 2015                            #
#                                                                       #
#########################################################################

########### Xcode ###########
# Xcode temporary files that should never be committed

## Build generated
build/
DerivedData

# NB: NIB/XIB files still exist even on Storyboard projects, so we want this
*~.nib
*.swp

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

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

########### Mac OS X ###########
# Mac OS X temporary files that should never be committed

.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

########## Objective-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 repository. Instead, use fastlane to re-generate the

fastlane/report.xml
fastlane/screenshots

හොඳයි, ආදම්ට ස්තූතියි . ඔහුගේ පිළිතුර මට බොහෝ සෙයින් උපකාරී විය, නමුත් මට .gitignore ගොනුවක් අවශ්‍ය බැවින් තවත් ඇතුළත් කිරීම් කිහිපයක් එකතු කිරීමට සිදුවිය:

මැක් ඕඑස් එක්ස් + එක්ස්කෝඩ් + ස්විෆ්ට්

යොමුව: මෙය සහ මෙය


1
ඉතා ප්‍රයෝජනවත් පිළිතුරකි. මම එය එක්ස්කෝඩ් පිළිතුරේ මගේ සැකසුම් ගිතුබ්හි සබැඳියක් ලෙස එක් කළෙමි .
සුරග්

9

පතල .bzrignore, නමුත් එය එකම අදහසකි :)

.DS_Store
*.mode1v3
*.pbxuser
*.perspectivev3
*.tm_build_errors

මෙම tm_build_errors මම භාවිතා කරන විට සඳහා TextMate මගේ ව්යාපෘතිය ඉදිකිරීමට. එය හේගලින් තරම් පුළුල් නොවේ, නමුත් මම සිතුවේ එය tm_build_errors රේඛාව සඳහා පළ කිරීම වටී.



4

මම එකතු කර ඇත:

xcuserstate
xcsettings

මගේ .gitignore ගොනුව මගේ ව්‍යාපෘතියේ මුලෙහි තැබීය.

කැපවීමෙන් හා තල්ලු කිරීමෙන් පසුව. මම පසුව දිව්වා:

git rm --cached UserInterfaceState.xcuserstate WorkspaceSettings.xcsettings

පහත ෆෝල්ඩරය සමඟ වළලනු ලැබේ:

<my_project_name>/<my_project_name>.xcodeproj/project.xcworkspace/xcuserdata/<my_user_name>.xcuserdatad/

මම පසුව දුවගෙන ගිහින් ආපහු තල්ලු කළා


ඔබත් එය එකතු කළාද? නැත්නම් ඔබ කරන සියල්ලම මෙයද?
හක්රේ

1
ඔව්, මම දෙකම එකතු කළ නමුත් xcusersate ප්‍රධාන වරදකාරී ගොනුව විය. මගේ කේතය දුරස්ථව තල්ලු කළ හැකි එකම ක්‍රමය එය එකතු කිරීමයි. එසේ නොමැතිනම් තල්ලු කිරීමට පෙර කැපවීම අවශ්‍ය වන ප්‍රතිපෝෂණ වළල්ලක මම සිරවී සිටියෙමි. ඒ නිසා ඔබ බැඳී සිටිනවා නම්, Xcode 4.5 නැවත ඔබෙන් ඉල්ලා සිටින අතර පූර්ව ගණනය සිදු වන නිසා ඔබට කිසි විටෙකත් තල්ලු කළ නොහැක.
user1524957

4

Gitignore.io හි ජනනය කරන ලද පහත දැක්වෙන .gitignore ගොනුව මම භාවිතා කරමි:

### Xcode ###
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.xcuserstate


### Objective-C ###
# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate

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

4

සියල්ගෙන්ම හොදම,

gitignore.io

ගොස් ඔබේ භාෂාව තෝරන්න, එවිට එය ඔබට ගොනුව ලබා දෙනු ඇත.


2

.gitignoreඅළුත් Xcode ගබඩාවන් සඳහා GitHub පෙරනිමියෙන් භාවිතා කරන්නේ මෙන්න :

https://github.com/github/gitignore/blob/master/Objective-C.gitignore

ඕනෑම වේලාවක එය සාධාරණ ලෙස නිවැරදි වීමට ඉඩ ඇත.


Github .gitignore ගොනුව යනු අතීතයේ අපට ගැටළු ඇති සියලුම ලිපිගොනු එකතුවකි. මේ මොහොතේ, ඔබ මුල සිටම Xcode ව්‍යාපෘතියක් ආරම්භ කරන්නේ නම්, Xcode මඟින් git නිධිය පෙර සැකසීමට ඉඩ දෙන්න, .Gitignore හි නොසලකා හැරීමට වැඩි යමක් ඉතිරිව නැත .Gitignore: මම නොසලකා හැරීමට කැමති එකම දෙය xcuserdata / ... .
හරස් කේතය

මම gitignores සොයන පළමු ස්ථානය GitHub වේ :)
Ben Leggiero

1

බොහෝ පිළිතුරු Xcode 4-5 යුගයේ සිට ය. නවීන ශෛලියකින් නොසලකා හරින ගොනුවක් මම නිර්දේශ කරමි.

# Xcode Project
**/*.xcodeproj/xcuserdata/
**/*.xcworkspace/xcuserdata/
**/*.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
**/*.xcworkspace/xcshareddata/*.xccheckout
**/*.xcworkspace/xcshareddata/*.xcscmblueprint
.idea/

# Xcode Injection
IOSInjectionProject/
OSXInjectionProject/

# Build
build/
DerivedData

# CocoaPods
Pods/

# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/sign&cert

# CSV
*.orig
.svn

# Other
*~
.DS_Store
*.swp
*.save
._*
*.bak

එය යාවත්කාලීනව තබා ගන්න: https://github.com/BB9z/iOS-Project-Template/blob/master/.gitignore


0

.Gitignore සහ .gitattribte * .pbxproj ගොනුව දූෂිත විය හැකි බව අපි සොයා ගත්තෙමු. එබැවින් අපට සරල සැලැස්මක් ඇත.

කාර්යාලයේ කේත කරන සෑම පුද්ගලයෙකුම මෙම ගොනුවේ කළ වෙනස්කම් ඉවතලයි. කැපවීමේදී අපි මූලාශ්‍රයට එකතු කරන ලද ගොනු සරලව සඳහන් කරමු. ඉන්පසු සේවාදායකයට තල්ලු කරන්න. අපගේ ඒකාබද්ධ කළමණාකරු බැඳීම් විස්තර ඇදගෙන ගොස් ලිපිගොනු සම්පත් වලට එකතු කරයි.

ඔහු දුරස්ථ යාවත්කාලීන කළ පසු සෑම කෙනෙකුටම වැඩ කරන පිටපතක් ඇත. යමක් අස්ථානගත වී ඇත්නම් එය එකතු කරන ලෙස අපි ඔහුට දන්වා නැවත වරක් අදින්නෙමු.

මෙය කිසිදු ගැටළුවක් නොමැතිව අප වෙනුවෙන් සකස් කර ඇත.


0

උත්පාදනය කිරීම සඳහා ජෝ භාවිතා කිරීම මම නිර්දේශ කරමි.gitignoreගොනුවක් .

IOS ව්‍යාපෘතියක් සඳහා පහත විධානය ක්‍රියාත්මක කරන්න:

$ joe g osx,xcode > .gitignore

එය මෙය ජනනය කරනු ඇත .gitignore :

.DS_Store
.AppleDouble
.LSOverride

Icon
._*

.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns

.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

build/
DerivedData

*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata

*.xccheckout
*.moved-aside
*.xcuserstate

-4

Xcode ව්‍යාපෘතිය සඳහා ස්ථාවර .gitignore ගොනුවක ව්‍යුහය>

.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db
Thumbs.db
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
!default.xcworkspace
xcuserdata
profile
*.moved-aside
DerivedData
.idea/

මෙය පෙර පැවති ඕනෑම පිළිතුරකට වඩා වෙනස් වන්නේ කෙසේද? ඔබගේ gitignoreගොනුව මෙහි අලවන්න එපා , මෙය මෙම විෂයයට කිසිවක් එකතු නොකරයි.
ෂ්ලි මිල්ස්

@ අෂ්ලිමිල්ස් කරුණාකර පිළිතුර පළමුව කියවා අදහස් දැක්වීමක් එක් කරන්න .... පිළිතුර අත්‍යවශ්‍ය ව්‍යුහයක් / අවශ්‍ය ඒවා සඳහා .... අත්‍යවශ්‍ය ඒවා වේ ...
රාහුල් සිංහා රෝයි
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.