(转)[ios].DS_store 文件冲突

 

转自:http://blog.csdn.net/jason_chen13/article/details/50751853

 

1.显示隐藏文件

 显示:defaults write com.apple.finder AppleShowAllFiles  YES

  隐藏文件的命令:defaults write com.apple.finder AppleShowAllFiles  NO

 

 

 

2.命令行 cd到项目根目录下

   文稿 (Documents)

 

3.删除.DS_Store 

 find . -name .DS_Store -print0 | xargs -0 Git rm -f --ignore-unmatch

 

4.用命令行创建和打开

  touch .gitignore

  open .gitignore

 

5.输入要过虑文件

 .DS_Store

DerivedData

.*.sw?

*.cso

tmp

*.mode1v3

*.pbxuser

*.xcworkspace

xcuserdata

console.log

(Git ignore UserInterfaceState.xcuserstate)

1. 退出xcdoe, 打开终端(Terminal),进入到你的项目目录下

2. 在终端键入

 

git rm --cached 工程名.xcodeproj/project.xcworkspace/xcuserdata/用户名.xcuserdatad/UserInterfaceState.xcuserstate

3. 在终端键入  git commit -m "Removed file that shouldn't be tracked"

4. 在.gitignore文件中加入如下几行

 

  1. *.xcuserstate  
  2. project.xcworkspace  
  3. xcuserdata  
  4. UserInterfaceState.xcuserstate  
  5. project.xcworkspace/  
  6. xcuserdata/  
  7. UserInterface.xcuserstate   


5. 重新打开Xcode commit, push。

猜你喜欢

转载自jameskaron.iteye.com/blog/2368650
今日推荐