Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: pathspec did not match any file(s) known to git

I'm having problems to deal with Git repos, Cocoa Pods, and Xcode 9. After creating the Xcode project and added the pod frameworks I'm getting this error when trying to import into source control and Github:

The working copy of "ProjectX" failed to commit files.

error: pathspec 'path/to/pod/files' did not match any file(s) known to git.

I'm also having the same problem with an asset, but that one I can simply delete it and add it again.

How could I import to GitHub source control the whole workspace? Is it possible?

Note 1:

Just tried the following steps:

  1. Create an Xcode 9 project
  2. Installed Cocoa Pods to project
  3. Open Workspace
  4. Created project remote on GitHub
  5. Committed Cocoa Pods files

Everything works fine this way, but what if instead of creating the project remote after adding cocoa pods, we do it before? I did that and that way doesn't work.

like image 734
Jonathan Solorzano Avatar asked Oct 08 '17 21:10

Jonathan Solorzano


1 Answers

This may be a case issue try running below command to change git case setting and then your commit file after this.

 git config core.ignorecase false --global

or try by below one if above one doesn't work

 git commit -m "<commit message>" <project directory path>
like image 142
Joe Avatar answered Sep 24 '22 16:09

Joe