My Git Book Writing Blog

Dealing with Git's Default Editor

One of the recent changes to the book has been to limit the exposure of Git’s default editor, vi.

Feedback from the recent second external review (2P) suggested that vi in chapter 4 “detracts from the topic” of making Git commit messages. I gave it some thought, and decided the feedback was appropriate. The goal of chapter 4 is to introduce Git basics. The reader would be absorbing a lot of new ideas in this chapter, and adding vi to that was a burden that could easily be avoided (using the -m switch to git commit).

I couldn’t avoid the vi editor in the chapters on git pull and git rebase, but in those later chapters I can point readers to chapter 20, which shows how to change Git’s default editor (with git config). I advise readers to skip ahead to that section, and perhaps before this book goes to print, the git config content in chapter 20 may be moved earlier. We’ll see. (I’m not a fan of customizing software until you understand its default settings.)

For people reading this post, feel free to comment/reply to this thread about your preference or feedback regarding how the default editor is handled. I’m now of the opinion that I should avoid vi as much as I can, so that beginners to Git can avoid the learning curve that is vi. (Git is hard enough!)

Of course, if you already know vi, you might think my hand-wringing is unnecessary. I know one thing: I’m glad the default editor isn’t Emacs!

Thank You, everyone, for reading!