在clone目录下删除ignore文件

删除本地分支需要忽略的文件

git rm --cached *.xcuserstate
git rm --cached *.xcuserdata
git rm --cached "*.DS_Store"

iOS开发中创建.gitignore 的文件内容

1.  cd (需要添加.gitignore文件的目录,Xcode工程的根目录)
2.  touch .gitignore
3.  vim .gitignore
4.  进入编辑模式点击 i 进行编辑
5.  将下列 ".gitignore文件内容" 拷贝到编辑区
6.  :wq 退出编辑模式
7.  .gitignore文件创建成功

.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
!Podfile
!Podfile.lock
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容