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?

2 answers

  • answered 2018-11-08 08:01 Siddhesh Rane

    The -w is a parameter to VS Code, so you'll not find it in git's help. You could have found it using code --help or online here

  • answered 2018-11-08 08:02 lapostoj

    The issue here is that this -w param is not one from Git but from VS Code. You can find documentation about it there:

    How you could have understood that? If you look at the command, the -w is 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.