2

Learning GIT. I tried committing a group of files, below you can see where I got to.

Asking for the commit comment/message but once I get to this screen, I am not able to input any text, everything I try, it will not let me enter any text into the window once it gets to this screen.

I am using the msysGit version with a program called Console 2 which is just a wrapper holding the msysGit command line tool

Any ideas why it would do this

Screenshot

Rudi
  • 19,366
  • 3
  • 55
  • 77
JasonDavis
  • 48,204
  • 100
  • 318
  • 537

3 Answers3

7

Git is using the "Vi" text editor by default. You need to add this to your Git config file:

nano ~/.gitconfig

This file may be blank if you do not have one yet. Add this line and then save using Ctrl-X:

git config core.editor "nano"

Nano is a more straightforward to use text editor for what you want to do.

If you don't have nano installed on your platform (as is the case in standard installs of Windows 7), you can optionally use Notepad++, or try this setup program to use standard Notepad instead.

Community
  • 1
  • 1
seanhodges
  • 17,426
  • 15
  • 71
  • 93
3

Try setting EDITOR to something you're used to before invoking git (or use git config to set core.editor). Or learn to use vi.

Alternatively, provide message from the command line

git commit -m 'this is the commit message'
Michael Krelin - hacker
  • 138,757
  • 24
  • 193
  • 173
2

What you see is git opening vim for you to edit the commit.

If you prefer other editor you can change the editor by setting:

export VISUAL=<your-editor>
export EDITOR=<your-editor>

All you need to do in that screen is to type a commit comment and save it, it will proceed with the commit (in whichever editor it appears).

stefanB
  • 77,323
  • 27
  • 116
  • 141
  • or `GIT_EDITOR` for the sake of completeness :) – Michael Krelin - hacker Dec 04 '11 at 12:01
  • I don't have VIM installed so maybe it is something else? the colors are from ym console wrapper `Console 2` – JasonDavis Dec 04 '11 at 12:14
  • Well git uses whichever editor is your default, you can change it to your preferred editor by setting the `EDITOR` variable in your environment. Btw, all you need to do in that screen is to type a commit comment and save it, it will proceed with the commit. – stefanB Dec 04 '11 at 12:20