Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialTyler Dix
14,230 Points"git add README.md" returns "fatal: path spec 'README.md' did not match any files'
I'm usiing Sublime as my text editor if this has anything to do with anything. I'm also in the proper directory in terminal (Mac OS X 10.10.3). Please help.
3 Answers
Tyler Dix
14,230 PointsI figured it out. To help other students with this problem, do this:
- Open your text editor of choice.
- Create a file, and make sure you name it 'README.md' (you can rename the file with the .md file extension after you save it).
- Save to your desktop or wherever.
- Drag this file to your git repository.
- In Terminal (for Mac users) type 'git add README.md'
- Type 'ls' to confirm the file has been committed (it should just show up as 'README.md' on the next line in terminal).
Hope this helps. I'm brand new to this so I didn't know I needed to create a file first.
Tyler Dix
14,230 PointsThanks for the quick response Andrew. I'm only vaguely familiar with terminal commands. Here's what I did:
- Created a git repository for my personal website, like mywebsite.com.
- Used the "cd" command 'cd mywebsite.com'
- Typed "git add README.md'
I'm getting the same fatal message over and over again. I have not specified which text editor I'm using (Sublime), so I'm wondering if this is the issue. Any help is appreciated.
Tyler Dix
14,230 PointsThe "ls" command returns nada. Just gives me another terminal line to issue a command.
Andrew McCormick
17,730 Pointswhat's you git config file look like? make sure all paths are correct.
I know you said that you're in the correct directory, but do an 'ls' command and make sure you see the readme file there. Also make sure that it's saved as all caps with lowercase extension just as you are typing it.
Oliver Sewell
16,425 PointsOliver Sewell
16,425 PointsThis helped me thanks Tyler