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

Brent Sullivan
Brent Sullivan
9,877 Points

trying to add commit message...getting ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) at bottom of screen...help!

Hi,

I am using git version 1.8.5.2 (Apple Git-48) in my terminal and am otherwise following right along with the video. Any help would be great. I do not know how to commit when I get the ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) prompt at the bottom of my terminal.

Thanks.

5 Answers

Justin Ellingwood
Justin Ellingwood
12,545 Points

Hello. It looks like you are trying to use nano-style keyboard shortcuts within vim.

In nano, you save with CTRL-X, then Y, then ENTER. However, this doesn't work in vim.

In vim, when you hit CTRL-X while in insert mode (the mode that allows you to type), vim thinks you are trying to use something called completion mode and is asking you what kind of completion you want to use.

When you see this, just hit the ESC key to get out of insert mode. Then, type :wq (colon + w + q) and hit ENTER. This will save your changes and exit out of the editor.

Steven Snary
Steven Snary
17,540 Points

In the videos the default text editor is nano - in your case the default text editor is vim. That is why the interface and the commands are different.

If you'd like to change the default text editor to nano then you need to type the following command

git config --global core.editor "nano"

After that when you use the git commit command or any other command that opens the default editor nano will be used instead of vim and what you see on your computer will now match what is shown in the videos.

Guillaume Maka
PLUS
Guillaume Maka
Courses Plus Student 10,224 Points

Hi,

Just press enter you're message at the end then Ctrl+X then Y

or use git commit -m "Your short mesage"

I can only guess you're getting stuck in the vim mode. If you type :exit (make sure you type the colon) and press enter this may help you finish your commit. If this doesn't work it would be good if you could attach a screenshot of your terminal window.

Brent Sullivan
Brent Sullivan
9,877 Points

These answers are awesome thank you everyone!

:wq plus git commit -m "Your short mesage"...did the trick!