How do I get Images.xcassets under source control?

不打扰是莪最后的温柔 提交于 2019-12-04 17:22:21

问题


So I migrated my AppIcons and LaunchImages to Images.xcassets, which is working fine it seems. But I made some modifications to the launch images, and now I went to commit the changes (I'm using a local-only git repo), and it seems Images.xcassets is not allowed to be committed to source control? Right-clicking on it, all the source control options are greyed out. And it doesn't show up in Xcode 5's new "global" commit dialog.

Seems ridiculous not to allow the assets file to be committed, am I missing something?


回答1:


This is most likely a bug in Xcode. Please file a bug report with Apple: http://bugreport.apple.com

As a workaround use the "global" commit dialog and select "File View" in the top of the side bar. The relevant files should then show up.




回答2:


Almost 2 years later, the same functionality exists for Xcode 7.1. The workaround that Matthias offers still allows you to upload assets.xcassets.




回答3:


Quitting the Xcode & reopening the project again worked!




回答4:


An alternative could be to try something along the lines of:

cd /to/the/folder/

git ls-files --others --exclude-standard | grep .imageset | xargs git add

git commit...


来源:https://stackoverflow.com/questions/20567075/how-do-i-get-images-xcassets-under-source-control

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!