记录已经有git库后,删除userinterface,ds_store

这个方式用于,删除git已经存在的userinterface,ds_store文件
1先cd到目录中

touch .gitignore

2:在文件中输入下面内容

*.xcuserstate
project.xcworkspace
xcuserdata
UserInterfaceState.xcuserstate
project.xcworkspace/
xcuserdata/
UserInterface.xcuserstate

.DS_Store
*/.DS_Store

3:如果项目中已经存在了ds_store文件

git rm --cached .DS_Store
git commit -m "Remove .DS_Store from repository"

4:如果项目中存在UserInterfaceState文件

//这里用于没有pod的工程路径
git rm --cached [工程名称].xcodeproj/project.xcworkspace/xcuserdata/[用户名].xcuserdatad/UserInterfaceState.xcuserstate
//存在pod工程路径
git rm --cached [工程名称].xcworkspace/xcuserdata/[用户名].xcuserdatad/UserInterfaceState.xcuserstate

git commit -m "Removed UserInterfaceState"

5:提交内容就可以了

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容