Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git error: unable to index file Crashlytics.framework/Headers

I am using Twitter's Fabric on my iOS app.

Crashlytics in Fabric just updated itself and now I cannot commit my project to git. I get the error:

git error: unable to index file Crashlytics.framework/Headers

fatal: updating files failed

enter image description here

Any idea what is going wrong or how to fix it?

Running git status reveals:

Untracked files:
(use "git add <file>..." to include in what will be committed)

Crashlytics.framework/Info.plist
Fabric.framework/Info.plist
profile.xcodeproj/project.xcworkspace/xcuserdata/
profile.xcodeproj/xcuserdata/
like image 784
Deekor Avatar asked Jun 01 '15 18:06

Deekor


3 Answers

Going into terminal and manually committing to git solved the issue. All my further commits in xcode have worked since.

git add .
git commit -m "message"
like image 105
Deekor Avatar answered Nov 17 '22 16:11

Deekor


I think this relates to the git submodule since I had similar issue. However adding or removing it didn't help. What worked was reseting it into HEAD version, e.g.

git reset HEAD problematic_file_or_dir
like image 11
kenorb Avatar answered Nov 17 '22 15:11

kenorb


The same issue happen to me with the Bolts.framework and Parse.framework. Both were added in the git repo already, so adding them back did not fixed the issue. I had to remove first:

cd MyApp/SDK/
git rm -r Parse.framework/
git rm -r Bolts.framework/

The I had to copy them again in the SDK/ folder and adding to git

 cd MyApp/SDK/
 git add .
 git commit * -m "Maintenance: Fixed git error unable to index file"
like image 2
loretoparisi Avatar answered Nov 17 '22 15:11

loretoparisi