Git commit Error message


#1

Hello,

I did twice git commit -m "Complete the first line of dialogue" in staging area and got an error message in red popup box below twice:

Input
$ git commit -m "Complete first line of dialogue""

git commit -m "Complete first line of dialogue"

Output
Valid Git commands start with the word "git" followed by a space, then the command name.

Lesson is not going ahead, please help.


#2

It sounds like it is stuck. Try to unstick it like this:

  • reload/refresh the web page - test it again
  • use the "I want to restart this exercise " option - test it again
  • post a screenshot of your whole web page if you are still stuck

#3

This is the problem.


#4

you need to add files to the staging area (git add .) before you can commit anything, you can also do a shorthand, both commit and add in the same line:

git commit -a -m "commit message"

the -a flag tells git add all files to the staging area


#5

thks it worked on retrying.