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

Not showing commands when "git commit"

When I type "git commit" in the console of my server, it doesn't show commands, I have to press Esc and type :quit, but I leave the commit without any comment. How could I see the commands so I can save the commits? I leave an img: http://postimg.org/image/59z58d7r7/. Thank you

5 Answers

James Barnett
James Barnett
39,199 Points

Diego Lazaro -

Have you tried configuring an editor on your CentOS box?

If you wanted to use nano as your editor you'd use this command:

git config --global core.editor "nano"
Iago Wandalsen Prates
Iago Wandalsen Prates
21,699 Points

Basically, trying to git commit without any argument, will try to open a editor, so you can type your message, what you probably want to do is type your commit message there, and than ctrl+O and ctrl+X, if im not mistaken. I'd recommend using git commit -m "your message here", so you avoid this confusing thing.

Have you done console basics course? That could be helpfull

I did that course, but I didn't learn to open or close the editor.

In this Git course, when they type "git commit", the editor shows up directly, but not to me.

I use git commit -m "Message", but I wanted to know why I can't see the editor (you are not mistaken).

Iago Wandalsen Prates
Iago Wandalsen Prates
21,699 Points

You are on windows(seems like)? Either way, they changed some configuration to open a specific editor. On some cases, it just happens on the terminal itself, and it gets really confusing

My server is cPanel/CentOS Linux, and I connect from a MacOs terminal by SSH

Ok, thank you anyway! I'll carry on with [git commit -m "Message"] and if I figure out how to fix it I'll answer this post

Thank you James, now it works ;)