I have checked almost all the questions on SO but nothing has worked for me. The issue that I'm unable commit the Contents.json file of .xcassets whatsoever. Whenever I add new images to .xcassets the source control does list the images but not the Contents.json file. I'm using a bitbucket repository and not even SourceTree is showing this file in the uncommitted changes. Even tried adding all the files via terminal.
git add --all
Any guess why this is happening and what could possibly be the solution?
Update: The .gitignore file looks like:
ProjectName.xcworkspace/xcuserdata
ProjectName.xcodeproj/xcuserdata
*.xcscheme
xcschememanagement.plist
And .git/info/exclude looks something like:
.DS_Store
UserInterfaceState.xcuserstate
Probably you have
.xcassets/Contents.jsonin one or more of the three ignore files.gitignore,.git/info/excludesand~/.gitexclude.If that is not the case then try executing below command which will ask Git to start tracking the file again:
For your case: