Skip to content

Instantly share code, notes, and snippets.

@killmenot
Forked from isqua/git-editor.md
Created January 7, 2020 13:20
Show Gist options
  • Save killmenot/7d4217f21f32e3fe859c94a2e2cf7a9c to your computer and use it in GitHub Desktop.
Save killmenot/7d4217f21f32e3fe859c94a2e2cf7a9c to your computer and use it in GitHub Desktop.

Set up git editor

The main command is:

git config --global core.editor "path to your editor with params"

Set up an editor and check it by making a commit:

git commit --allow-empty

Your favourite editor should open. Write commit message, save and close file. See git log to look for a commit. Is it there? If yes, you’re awesome.

Windows, Atom

git config --global core.editor "atom --new-window --foreground --wait"

Windows, Sublime Text 3

 git config --global core.editor "'c:/program files/sublime text 3/subl.exe' -w"

Windows, Notepad++

git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment