When I edit my assets catalog by adding or editing an image the Contents.json file does not show up in SourceTree if I want to commit the changes. The edited or added image shows in SourceTree but no changes to Contents.json.
I restarted my Mac, cleaned the build folder. It still does not show up.
I check .gitignore
but it does not contain "Contents.json".
I also tried git status --ignored
but it does not list "Contents.json".
git status --ignored
lists the following files in the Assets
folder:
ABCland/Resources/Company/Assets/.DS_Store
ABCland/Resources/Company/Assets/BBM.xcassets/ALT_BBM_SS/.DS_Store
ABCland/Resources/Company/Assets/JM.xcassets/.DS_Store
ABCland/Resources/Company/Assets/SN.xcassets/.DS_Store
ABCland/Resources/Company/Assets/SOL.xcassets/.DS_Store
ABCland/Resources/Company/Assets/STB.xcassets/.DS_Store
Could it be because of the .DS_Store files?
I opened the Settings in SourceTree and selected the Git tab and looked up the Global Ignore List path to the .gitignore_global
file.
I looked into the content of .gitignore_global
and saw that "Contents.json" was in there.
maxhuber@Max-MacBook-Pro ios-app % cat /Users/maxhuber/.gitignore_global
*~
.DS_Store
Contents.json
play-pause-blue.png
play-pause-blue@2x.png
play-pause-blue@3x.png
I solved it by removing "Contents.json" from .gitignore_global
. It works now!