Development Tools Introduction to Git First Commits First Commits

Anders Axelsen
Anders Axelsen
3,468 Points

How do I launch the text editor (git commit(without -m))-command? (error)

Hi there. I'm struggling a bit - with git.

So, upon entering my email and username, I have executed the command "git commit". What I get is this:

treehouse:~/workspace/medals$ git commit                                                              
On branch master                                                                                      
Untracked files:                                                                                      
        bronze.html                                                                                   

nothing added to commit but untracked files present 

Help would be appreciated.

Have a nice day.

1 Answer

Looking from the error Git provided, it seems that you forgot to git add the files. Try adding the files you wish to commit.

Anders Axelsen
Anders Axelsen
3,468 Points

Thank you. As I could not find it in the video tutorial that I needed to add bronze.html as well, I was confused. It is, however, cleared up by this intervention.

Anders Axelsen
Anders Axelsen
3,468 Points

Also after committing in nano, I get this message:

treehouse:~/workspace/medals$ git commit                                                              
[master 34d2c41] Add main site page                                                                   
 1 file changed, 4 insertions(+)                                                                      
 create mode 100644 bronze.html 

There are 4 insertions in my attempt instead of 6 as shown in the video. I suspect the addition of bronze.html has some influence. Am I wrong?