I've been trying to set Notepad++ as my default editor from Git-bash but when I run this command:
git config core.editor "notepad++ -multiInst -nosession"
I get this error:
fatal: not in a git directory
How can I do this?
I've been trying to set Notepad++ as my default editor from Git-bash but when I run this command:
git config core.editor "notepad++ -multiInst -nosession"
I get this error:
fatal: not in a git directory
How can I do this?
You've forgotten something in your command in your Git : if you're running x64 machine then try this command
$ git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"
The exact location of notepad++ should be placed there with the necessary parameters.
git config
by default affects the configuration for a specific repository. If you are not in a repository you will get the error you have seen.
If you want to make a user-wide configuration that is not specific to a repository, use git config --global
instead.
See: What is the difference between global and local configuration in git?