Git commit Error message

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.

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

This is the problem.

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

1 Like

thks it worked on retrying.

1 Like