Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 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"
- ```
- ## Mac OS X, TextEdit
- ```
- git config --global core.editor "open -W -n"
- ```
- ## Mac OS X, Atom
- ```
- git config --global core.editor "atom --wait"
- ```
- ## Mac OS X, Sublime Text 3
- ```
- ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" ~/bin/subl
- git config --global core.editor "subl -n -w"
- ```
- or
- ```
- git config --global core.editor '"/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" -n -w'
- ```
Add Comment
Please, Sign In to add comment