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 Introduction to Git First Commits First Commits

Anders Axelsen
Anders Axelsen
3,471 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,471 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,471 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?