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

John Forbes
John Forbes
10,879 Points

git commit -a -m "with a message" not working any ideas? It is returning the error - not the correct git command?

I have seen this on two quizzes now, when it asks me to commit all changes and add a message it won't let me. Tell me it is not the correct git command, here are a few I have tried. git commit -a -m "test" git commit -a git commit --All --Message "test" . I am using Chrome on Windows 10, did try it on Firefox also no luck?

LaVaughn Haynes
LaVaughn Haynes
12,397 Points

Are you working with git in the Treehouse workspace or are you working with git or your computer locally? Never mind. That was a silly question. You said that you encountered this during quizzes. Would you be able to post a link to the quiz? If not, no worries. I will find it when I get home.

John Forbes
John Forbes
10,879 Points

Ok tried it on ubuntu and chrome no luck , tried git commit README.md -m "TEST" ; This is really stumping me.

3 Answers

Jon Mullins
Jon Mullins
15,724 Points

OK, I think you might be combining the steps. In step 1, you add the README.md file with

git add README.md.

Then in step 2 you commit the change with

git commit -m "message"

I tried them in the quiz and those are the commands that worked for me.

John Forbes
John Forbes
10,879 Points

Yay that worked thank you !!!!

Jon Mullins
Jon Mullins
15,724 Points

Great! Glad you got it sorted out. I find that this is a good git reference. http://rogerdudler.github.io/git-guide/

LaVaughn Haynes
LaVaughn Haynes
12,397 Points

In the quiz that I came across it asks to add the changes in one step and commit in a separate step. Is this the question that you are having the issue with?

http://workspace.bonvon.com/temp/treehouse/git-commit.png

John Forbes
John Forbes
10,879 Points

https://teamtreehouse.com/library/git-basics/getting-started-with-git/commitment-therapy this is the one I am working on. and it is the second step in the commitment therapy. Thank you for your response. Sorry I was slow getting back busy time of year.

Jon Mullins
Jon Mullins
15,724 Points

try it without the space like: git commit -am "with a message"

John Forbes
John Forbes
10,879 Points

yeah that is giving me failed also. Sorry I have tried all I can think of, I feel like I am missing something or it is broken, I have installed git on two computers and the same command is working on them.