Xcode에서 Info.plist 파일을 GitHub에 무시하는 방법
Xcode에서 Info.plist 파일을 GitHub에 무시하는 방법
Xcode 프로젝트를 GitHub에 올릴 때 Info.plist
파일을 무시하도록 설정하는 방법을 설명합니다.
1. .gitignore
파일 수정
Git이 Info.plist
파일을 무시하도록 설정해야 합니다.
① .gitignore
파일 확인
ls -a
파일이 없으면 생성:
touch .gitignore
② .gitignore
파일 수정
# Xcode Info.plist 파일 무시 **/Info.plist
2. 이미 Git에 올라간 Info.plist
삭제
기존에 올라간 파일은 직접 제거해야 합니다.
① Git에서 Info.plist
추적 제거
git rm --cached path/to/Info.plist
예시:
git rm --cached MyApp/Info.plist
② 변경 사항 커밋
git commit -m "Ignore Info.plist" git push origin main
3. Xcode에서 Info.plist
관리
Git에서 무시하면 다른 개발자가 프로젝트를 클론할 때 Info.plist
가 빠집니다. 이를 방지하려면 템플릿 파일을 제공합니다.
① Info.plist.template
파일 생성
Info.plist
와 동일한 내용을 가진 Info.plist.template
을 만들어 Git에 올립니다.
② .gitignore
에 템플릿 파일 제외
!**/Info.plist.template
③ 필요 시 Info.plist
생성
cp Info.plist.template Info.plist
이제 Info.plist
를 Git에서 무시하면서도 프로젝트 관리가 가능합니다!
댓글
댓글 쓰기