我试图在Xcode中的assets.xcassets文件中跟踪差异,但我无法找到一种做git责备的方法。
答案 0 :(得分:1)
在终端中进行差异很容易:
humlet:Assets.xcassets matt$ git diff 0e010a 6d516c -- Image.imageset/Contents.json
diff --git a/Testing/Assets.xcassets/Image.imageset/Contents.json b/Testing/Assets.xcassets/Image.imageset/Contents.json
index 6376a19..5804661 100644
--- a/Testing/Assets.xcassets/Image.imageset/Contents.json
+++ b/Testing/Assets.xcassets/Image.imageset/Contents.json
@@ -1,17 +1,30 @@
{
"images" : [
{
- "idiom" : "universal",
- "filename" : "me.jpg",
+ "idiom" : "iphone",
"scale" : "1x"
},
{
- "idiom" : "universal",
+ "idiom" : "iphone",
"scale" : "2x"
},
{
- "idiom" : "universal",
+ "idiom" : "iphone",
"scale" : "3x"
+ },
+ {
+ "idiom" : "ipad",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "me.jpg",
+ "unassigned" : true,
+ "scale" : "1x"
}
],
"info" : {
正如您所看到的,这两个提交之间发生的事情是我删除了"通用"显示插槽并显示" iPhone"和" iPad"换句话说。