Skip to content

Instantly share code, notes, and snippets.

@yaowenqiang
Forked from nnja/config-editor.md
Created October 21, 2017 07:52
Show Gist options
  • Save yaowenqiang/74aa40aef30014c0219e8ba3eacc8273 to your computer and use it in GitHub Desktop.
Save yaowenqiang/74aa40aef30014c0219e8ba3eacc8273 to your computer and use it in GitHub Desktop.
Configure git editor

Set which editor git should use.

This is the program that will open during a commit with no -m flag, a merge, a rebase, etc...

Select from any installed editor. Examples:

  • emacs: emacs
  • vi: vi or vim
  • atom: atom --wait
  • sublime: subl -n -w
  • vscode: code --wait

Run: $ $ git config --global core.editor <YOUR_EDITOR>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment