7

I just installed Git on Windows XP Pro and I'm trying to apply it to my project.

I'm trying git-ize a legacy directory structure:

C:\src>git init
C:\src>git add *.c
C:\src>git commit -m 'initial project version'
error: pathspec 'project' did not match any file(s) known to git.
error: pathspec 'version'' did not match any file(s) known to git.

Any ideas what the problem could be? What does this error mean?

"git status" displays many "new file:" lines so I don't know why it says it doesn't match anything.

2 Answers 2

11

Try using double quotes for "Initial project version"

1
  • Is this a operating system thing? I had the same issue on Windows.
    – Merritt
    Apr 22, 2016 at 19:51
2

I had the same problem and the answer from BloodPhilia worked!

I just wanted to move one of my projects to the GitHub, so I just copied commands from my GitHub repository setup:

git init
touch README
git add README
git commit -m 'first commit'
git remote add origin https://github.com/YuriyHorobey/lp.git
git push -u origin master

(touch will not work under Windows, just create a README file) and this one had failed:

git commit -m 'first commit'

I've replaced ' with " and it works!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .