The default git diff tool is vimdiff, and you can set it by commands below: $ git config -global diff.tool vscode $ git config -global 'code -wait -diff $LOCAL $REMOTE' You can remove VS Code by command below: $ git config -global -unset core.editor Use VS Code as git default diff tool and merge tool This command opens VS Code in a new window and git waits until to save contents and close the window. you can configure VS Code as the default editor with the command below: $ git config -global core.editor "code -wait -new-window" The default git editor is Nano, I used to use vim as a git editor until I found VS Code is convenient for that. Use VS Code instead of nano as the default git editor Linux: You must install VS Code from the.Mac OS: Press CMD+Shift+P keys and type Shell Command: Install 'Code' command in PATH in the command palette.Windows: you must add the location of VS Code installation to the PATH variable in the Environment Variables setting.If the command is not found you must introduce VS Code to your operating system to can run it from CLI: You can test the access VS Code by running the CLI command below. Run VS Code from the command-lineīefore you can use VS Code as a git editor you must ensure you can access and run it from the command line. ![]() So I found VS Code can be config as a really convenient tool inside the git. After a while, I look at VS Code and think, about why I’m not using it as a git tool to write commit messages, get a diff between files, or resolve merge conflicts. I’m using visual studio code as a fixed tool for a lot of opportunities like opening and editing files and sources quickly because it’s really light and fast for me.
0 Comments
Leave a Reply. |