2011-12-25 6 views
12

저는 iOS 프로젝트에서 작업 중이며 버전 관리를 위해 git을 사용하고 있습니다. 다른 개발자와 함께이 작업을하고 있습니다.내 git repo에서 Xcode 프로젝트 파일을 제외 할 수 있습니까?

어떤 Xcode 프로젝트 파일을 보관해야하며 다른 개발자에게 부정적인 영향을 미치지 않도록 제외 할 수있는 프로젝트 파일은 무엇입니까?

git이 수정하거나 추가 한 비 코드 파일은 다음과 같습니다. (BTW, YourProject.xcodeproj에 대해 "패키지 내용 표시"를 사용하는 경우에만 BTX를 볼 수 있습니다 파일)

제외?

  • contents.xcwordspacedata는
  • UserInterfaceState.xcuserstate (I이 그냥 작업 공간 설정 생각)
  • Breakpoints.xcbkptlist ((이름에 따라이 나에게 특정 보인다) ... 내 브레이크 포인트 설정)

INCLUDE?

  • project.pbxproj는
  • 이 * .xscheme가 (포함 ... 구조 정의)
  • xschememanagement.plist (... 프로젝트 설정 포함) (포함 ... 계획 관리자 설정을?)

이게 맞습니까?

(git의 제외 기능을 사용하고자하는 경우 참고하시기 바랍니다. 로컬 저장소에서 .git/info/exclude 파일을 편집하십시오. git이 무시할 파일이나 파일의 패턴을 넣으십시오. 예를 들어, 자식이 foo.temp, bar.temp를 무시하도록하려면 * .temp라고하는 파일에 행을 추가 할 수 있습니다.

+0

마지막 단락을 괄호로 묶으십시오. 일반적으로 적절한 디렉토리 루트에있는 .gitignore 파일을 사용하는 것이 더 바람직합니다. .gitignore 파일은 상위 디렉토리의 파일 시스템 서브 트리에 적용됩니다. –

답변

2

당신이 포함하는 것에 대해 확실히 맞습니다. 그렇지 않으면 중요한 정보가 누락됩니다. 프로젝트 파일.

excludes는 어떤 프로젝트가 작업 공간의 일부인지 저장한다고 생각하기 때문에 중단 점과 xcuserstate는 제외하지만 xcworkspacedata는 제외합니다.

3

는이 Xcode .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 

내가 좀 더 포괄적 인 생각 나는 Xcode .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: 
# http://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 

.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 

위는 CocoaPods, 카르타고와 시간이 지남에 보여 주었다 몇몇 다른 사람을 추가합니다.

2

This site (www.gitignore.io)에서는 IDE 및/또는 언어를 지정하고 맞춤형 .gitignore - 굉장한 사이트를 보여줍니다!

관련 문제