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

Git Deep Dive - first commit message

Hi.

I'm on Windows XP

I'm following the Git deep dive but when it came to the moment of making the first commit and adding the message, I can't see what the instructor does to "save" the message. I don't know what command he used after typing "Added the README file" and right before he says "we see a success message". I can't find how to "save" the commit.

I'm here: http://screencast.com/t/dUS5EepiWnJ4

When I add the "Added Readme" what should I do next? How to I save it?

2 Answers

If you don't specify a message when you do your commit, git will open its default editor and make you enter a commit message in that program. You have to type your message into the editor, and then exit the editor. Just exit the editor after you type your message; you don't need to save it. The default editor that you're in is called vim. It's a little (or a lot) confusing. Here's how to exit the editor http://stackoverflow.com/questions/11828270/how-to-exit-the-vim-editor

You can change git's default editor to something like Notepad. Google can tell you how to.

If you specify a commit message when you do your commits, you can avoid the text editor altogether. You enter commit messages like this

git commit -m "This is my message"

Thank you! In the next video he shows exactly the -m flag.. :)