How to search for a subject like this
To do a git commit with my own editor (Visual Code)
I needed to setup the editor like this:
git config --global --replace-all core.editor "code -w"
I was searching for this a long time and found out the
-w was missing after code.
Without StackOverflow I would probably never know this. Can you explain me a little bit how I can solve such problem. In
git config --help or the documentation of git I coulnd't find anything about the
-w at the end.
Where did people on StackOverflow found about this?
-wis a parameter to VS Code, so you'll not find it in git's help. You could have found it using
code --helpor online here
The issue here is that this
-wparam is not one from Git but from VS Code. You can find documentation about it there: https://code.visualstudio.com/docs/editor/command-line
How you could have understood that? If you look at the command, the
-wis inside the
""block so it means it is part of the command you pass to the Git config, so a parameter of the VS Code command line tool.