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 Git Basics Getting Started With Git Committing Changes

I'm trying to add the readme file using a mac when starting the commit, it didn't open in nano. i can't get out using ^x

^x doesn't get me out of the commit part. i get "-- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)" instead.

3 Answers

The default text editor is vim. You can change the default to nano, but for now you can get out of the vim editor by doing the following:

:q to quit :q! to quit without saving

you can do other stuff like:

:x to write and then quit :qa to quit everything :wq Write then make with the quitting.

Nano is quite a bit easier, but you actually have to set it up as the default or specify that you want to open text files with it.

To make it the default, you need to find a file called .bash_profile and add the line 'export EDITOR=nano' and save it. That will make it your default.

Hope this helps!

Eben Smith

This should fix it export EDITOR=/usr/bin/nano

You probably aren't using nano, us this code

git config --global core.editor "nano"