2

enter image description here

This happened after I upgraded Crashlytics to Fabric by following the Fabric update wizard.

Here is what the folder structure looks like:

enter image description here

Why does Git think that the Crashlytics.framework/Headers folder is deleted when it's not and in fact there are new files that are being added within the Headers folder?

It is possible that Git is confused because I had to delete an old "Crashlytics.framework" which is replaced by this new version of the framework with the same folder name but different content?

How do I make Git know that the Crashlytics.framework/Headers folder is not actually deleted?

Currently I'm hesitant to commit and push this.

Makoto
  • 104,088
  • 27
  • 192
  • 230
Jamornh
  • 539
  • 6
  • 15
  • 3
    I believe git does not track directories. Is it possible `Headers` was a file or submodule? – wimh Aug 16 '15 at 16:09
  • Do you still see the folder? Does it still contain those files that you added to the staging area? This is independent of Git; do those files exist in that folder on disk? – Makoto Aug 16 '15 at 16:10
  • git does not track directories – chicks Aug 16 '15 at 16:29
  • @Makoto yes the folder does exist it does contain the files within the staging area. The files do exist in that folder on the disk, I'll update the question with the image of the folder itself. Thanks! – Jamornh Aug 16 '15 at 16:51
  • @Wimmel hmmmm then is there a solution to this issue? What I'm seeing here does not make much sense. – Jamornh Aug 16 '15 at 16:52
  • *"Currently I'm hesitant to commit and push this."* -- commit with confidence. `git commit` doesn't change the files in the working tree, you do not lose anything if you commit. – axiac Aug 16 '15 at 20:55

1 Answers1

1

git doesn't track directories. It does, however, track symbolic links, and it does so by representing the link as a small text file with a link file-type (as on this SO answer).

The directory would look identical to you, and you could traverse it with cd the same way, but on the file system it would appear very different. I don't know for sure whether Finder represents symlinked directories as any different, but it might not.

My hunch is that the directory was previously a symbolic link to some other directory, which git acknowledged as a file named "Headers", and that the upgrade replaced the symbolic link with an actual directory containing normal files.

Community
  • 1
  • 1
Jeff Bowman
  • 90,959
  • 16
  • 217
  • 251