Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Development Tools Introduction to Git First Commits First Commits

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