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

Joshua Erskine
Joshua Erskine
7,706 Points

If your editor looks different, and you want to Exit:

After you type git commit it takes you to a more colourful text editor, then you might be using Vim instead of nano or Notepad:

  1. Bring up the command-line at the bottom of the page via: SHIFT + q

  2. Type q!

if it says -- INSERT -- then you need to exit that mode first by hitting the ESC key.

Hope that helps.

You can force Windows Git-BASH to use Notepad via https://github.com/github/gitpad (as per previous video).

[ using Windows 7, Chrome, Git 2.7.0.windows.1 ]

2 Answers

Sage Elliott
Sage Elliott
30,003 Points

Thanks for sharing! :D

Jane Eyer
Jane Eyer
2,586 Points

If ctrl + x does not work for you then your git is using vim. In that case, Press esc and type ":wq" (w- means for write, q - means for quit) and press enter.

In the future if you want to use nano as a default text editor. then go to the main screen on terminal. type: nano ~/.gitconfig

The above command line will open an empty file and in the empty file type: git config core.editor "nano"

then press ctrl + x and enter to save and get out.

Happy gitting :D