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

Daniel Stuntz
Daniel Stuntz
1,683 Points

Stuck on Git Basics, Challenge Task 2 of 3

While on Challenges Task 2 of 3, for "Getting Started with Git" (https://teamtreehouse.com/library/git-basics/getting-started-with-git/commitment-therapy), I entered my answer:

 git commit -a -m "Added README file"

However, even after trying several times, my answer was considered wrong. I kept getting the following error message:

 "Bummer! That was the wrong git command. Try again.".

I don't understand why I kept getting it wrong, because I rechecked the format of the "commit" command, and verified that it is "git commit -a -m", followed by a space and a quotation-mark-enclosed message.

When I tried again (a 3rd and 4th time), I entered the message exactly as I saw it in the video, but still got it wrong.

I then tried one more time. That time, I tried specifying the file name (README.md) instead of the "-a" option. It was still considered wrong.

So, at this point, I am stuck, and would greatly appreciate some feedback regarding a solution.

Thanks.

Sincerely, Daniel K. Stuntz.

2 Answers

Adrian Zamfir
Adrian Zamfir
13,529 Points

Try this:

git commit -m "These are my new changes" 
Cindy Lea
PLUS
Cindy Lea
Courses Plus Student 6,497 Points

Try git add README.md on the command line

Dont use no quotes. You have to specify the filename exactly as in the challenge.

The other problem is that you were committing the file & they wanted you to specifically add it for this challenge.

You are describing challenge 1 of 3, though.

This question is regarding 2 of 3 and I have the exact same problem.