-2

How to invoke sublime text editior in git in windows 10. I do this using alias np="/c/Program Files/Notepad++/notepad++.exe" but this is temporary i want to invoke it as np permanently

Iskustvo
  • 295
  • 1
  • 13
  • Save it into `~/.bashrc` or such. – iBug May 06 '18 at 12:53
  • Possible duplicate of [How can I make Sublime Text the default editor for Git?](https://stackoverflow.com/questions/8951275/how-can-i-make-sublime-text-the-default-editor-for-git) – phd May 06 '18 at 16:01

2 Answers2

0

From the github documentation

git config --global core.editor "'c:/program files/sublime text 3/subl.exe' -w"
Cory Kramer
  • 107,498
  • 14
  • 145
  • 201
0

Append your alias to the end of ~/.bashrc so it's loaded every time bash starts.

echo 'alias np="/c/Program Files/Notepad++/notepad++.exe"' >> ~/.bashrc
iBug
  • 32,728
  • 7
  • 79
  • 117