This version of GitHub Enterprise will be discontinued on This version of GitHub Enterprise was discontinued on 2020-08-20. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise. For help with the upgrade, contact GitHub Enterprise support.

Article version: Enterprise Server 2.18

Associating text editors with Git

Use a text editor to open and edit your files with Git.

In this article

Using Atom as your editor

  1. Install Atom. For more information, see "Installing Atom" in the Atom documentation.
  2. Open TerminalTerminalGit Bash.
  3. Type this command:
    $ git config --global core.editor "atom --wait"

Using Visual Studio Code as your editor

  1. Install Visual Studio Code (VS Code). For more information, see "Setting up Visual Studio Code" in the VS Code documentation.
  2. Open TerminalTerminalGit Bash.
  3. Type this command:
    $ git config --global core.editor "code --wait"

Using Sublime Text as your editor

  1. Install Sublime Text. For more information, see "Installation" in the Sublime Text documentation.
  2. Open TerminalTerminalGit Bash.
  3. Type this command:
    $ git config --global core.editor "subl -n -w"

Using TextMate as your editor

  1. Install TextMate.
  2. Install TextMate's mate shell utility. For more information, see "mate and rmate" in the TextMate documentation.
  3. Open TerminalTerminalGit Bash.
  4. Type this command:
    $ git config --global core.editor "mate -w"

Using Atom as your editor

  1. Install Atom. For more information, see "Installing Atom" in the Atom documentation.
  2. Type this command:
    $ git config --global core.editor "atom --wait"

Using Visual Studio Code as your editor

  1. Install Visual Studio Code (VS Code). For more information, see "Setting up Visual Studio Code" in the VS Code documentation.
  2. Open TerminalTerminalGit Bash.
  3. Type this command:
    $ git config --global core.editor "code --wait"

Using Sublime Text as your editor

  1. Install Sublime Text. For more information, see "Installation" in the Sublime Text documentation.
  2. Open TerminalTerminalGit Bash.
  3. Type this command:
    $ git config --global core.editor "'C:/Program Files (x86)/sublime text 3/subl.exe' -w"

Using Notepad++ as your editor

  1. Install Notepad++ from https://notepad-plus-plus.org/. For more information, see "Getting started" in the Notepad++ documentation.
  2. Open TerminalTerminalGit Bash.
  3. Type this command:
    $ git config --global core.editor "'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"

Using Atom as your editor

  1. Install Atom. For more information, see "Installing Atom" in the Atom documentation.
  2. Open TerminalTerminalGit Bash.
  3. Type this command:
    $ git config --global core.editor "atom --wait"

Using Visual Studio Code as your editor

  1. Install Visual Studio Code (VS Code). For more information, see "Setting up Visual Studio Code" in the VS Code documentation.
  2. Open TerminalTerminalGit Bash.
  3. Type this command:
    $ git config --global core.editor "code --wait"

Using Sublime Text as your editor

  1. Install Sublime Text. For more information, see "Installation" in the Sublime Text documentation.
  2. Open TerminalTerminalGit Bash.
  3. Type this command:
    $ git config --global core.editor "subl -n -w"

Ask a human

Can't find what you're looking for?

Contact us