Skip to content

Instantly share code, notes, and snippets.

@nnja
Created October 5, 2017 05:00
Show Gist options
  • Save nnja/caeb2ffeb407debca3bde5f875996804 to your computer and use it in GitHub Desktop.
Save nnja/caeb2ffeb407debca3bde5f875996804 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>

@krzysiekpiasecki
Copy link

@jdkahn If you're installed vscode with an executable on the path, you don't have to set full path to vscode in git config.

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