先在工程目录(和.git仓库同路径的目录下)配置有 .gitignore 文件;
在终端键入下面3句
git rm --cached [YourProjectName].xcworkspace/xcuserdata/[YourUsername].xcuserdatad/UserInterfaceState.xcuserstate
git commit -m "Removed file that shouldn\'t be tracked"
git push
.gitignore文件下载地址,https://github.com/github/gitignore
网友评论