Is there any way to do a git blame on the assets file in Xcode?

309 views Asked by At

I'm trying to track a diff within the assets.xcassets file in Xcode but I can't find a way to do a git blame.

1

There are 1 answers

0
matt On

It's easy to do a diff in Terminal:

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" : {

As you can see, what happened between these two commits is that I removed the "universal" display of slots and displayed "iPhone" and "iPad" slots instead.