Guest User

Untitled

a guest
Apr 20th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. # Set up git editor
  2.  
  3. The main command is:
  4.  
  5. ```
  6. git config --global core.editor "path to your editor with params"
  7. ```
  8.  
  9. Set up an editor and check it by making a commit:
  10.  
  11. ```
  12. git commit --allow-empty
  13. ```
  14.  
  15. 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.
  16.  
  17. ## Windows, Atom
  18.  
  19. ```
  20. git config --global core.editor "atom --new-window --foreground --wait"
  21. ```
  22.  
  23. ## Windows, Sublime Text 3
  24.  
  25. ```
  26. git config --global core.editor "'c:/program files/sublime text 3/subl.exe' -w"
  27. ```
  28.  
  29. ## Windows, Notepad++
  30.  
  31. ```
  32. git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"
  33. ```
  34.  
  35. ## Mac OS X, TextEdit
  36.  
  37. ```
  38. git config --global core.editor "open -W -n"
  39. ```
  40.  
  41. ## Mac OS X, Atom
  42.  
  43. ```
  44. git config --global core.editor "atom --wait"
  45. ```
  46.  
  47. ## Mac OS X, Sublime Text 3
  48.  
  49. ```
  50. ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" ~/bin/subl
  51. git config --global core.editor "subl -n -w"
  52. ```
  53.  
  54. or
  55.  
  56. ```
  57. git config --global core.editor '"/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" -n -w'
  58. ```
Add Comment
Please, Sign In to add comment