1

I have a directory named "Build" (from Carthage) which appears to be ignored by Git. I really do not want it to. I tried to add one file in the directory individually, it said:

The following paths are ignored by one of your .gitignore files:
platforms/ios/Carthage/Build/iOS/Zip.framework/Zip
Use -f if you really want to add them.

But I checked my .gitignore it does not seem to do have such a rule.

What exactly has happened?

EDIT:

This is my gitignore:

*.swp
tags
.DS_Store
*.xcuserstate
project.xcworkspace/
xcuserdata/
*.espressostorage
Makefile
huggie
  • 17,587
  • 27
  • 82
  • 139

1 Answers1

2

There is 3 ignore files on git:

  • $HOME/.config/git/ignore
  • $GIT_DIR/info/exclude
  • .gitignore

You can check what file is ignoring your file:

git check-ignore --verbose platforms/ios/Carthage/Build/iOS/Zip.framework/Zip

Then you delete the rule.

Akram Fares
  • 1,653
  • 2
  • 17
  • 32
  • Thanks, helpful. Want to add that there can be multiple .gitignore in any of the sub-directories all working together. – huggie Dec 30 '16 at 02:07