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 trial

Development Tools Git Basics Getting Started With Git Commitment Therapy

Roger Dailey
Roger Dailey
14,887 Points

Committing the README.md file to repository?

It is saying that I am using the wrong command. I'm confused because I am typing in "git commit README.md". What am I doing wrong?

2 Answers

First,

git add README.md

then

git commit -m "updated read me"

Roger Dailey
Roger Dailey
14,887 Points

Thanks for the help. Why would I not put the README.md in the line of code, the video it had me put it in?

I believe you can commit a single file in this way, with a -m "comment" to say what you updated. But most of the time you add files to track, then you commit them all. I believe that's what the challenge is asking for.

Roger Dailey
Roger Dailey
14,887 Points

Oh I see, thank you again John.

No problem. Glad to help.

Kagisho Moroka
Kagisho Moroka
8,716 Points

Kagisho Moroka 5,789 <1m ago first add Readme File by entering "git add README.md" Then git commit OR

git commit -m "Your message