Development Tools Introduction to Git First Commits First Commits

Cory Musick
Cory Musick
Front End Web Development Techdegree Student 8,545 Points

How do I open the editor?

I've commit both of the files just like the video says but I can't get the editor to open. I typed (git commit) without the -m like instructed to get to the editor but instead I get the following. treehouse:~/workspace/medals$ git commit
On branch master
nothing to commit, working directory clean

2 Answers

Jamie Reardon
Jamie Reardon
Front End Web Development Techdegree Student 13,115 Points

If you run git status to begin with, does it say there's a file staged for commit? If it says the same nothing to commit, working directory clean

Then you have no modified files. Run git log to see the latest commit.

If you do however see the message: file staged ready for commit. Then you are at the right stage to run the command.

Jamie Reardon
Jamie Reardon
Front End Web Development Techdegree Student 13,115 Points

If you have already committed the files like you have said you have done in your OP, then you won't be able to run git commit again.

The git commit subcommand can only be used when there is one or more files that are staged for commit.