![]() ![]()
On the other hand, GUI tools help us to do things faster and don’t get confused in complex situations And VS Code is one of the best free tools you can use as an editor and comparing tools in your development environment. #VISUAL STUDIO CODE GIT CONFIG HOW TO#I always prefer to use the default CLI tools like vim to work with git and other command-line tools because sometimes you need to work with git and bash in a headless server with only default tools installed on it, so you need to know how to work with these tools at first. You can copy all these lines into your git config files in your home directory ( ~/.gitconfig) to set all commands above. tool = vscode editor = code -wait -new-window cmd = code -wait -diff $LOCAL $REMOTE tool = vscode cmd = code -wait $MERGED. My global git config file after these changes is like it: $ cat ~/.gitconfig. You can unset these configs like diff tools by using the -unset flag after the config command. ![]() Git doesn’t have a default merge tool, you can use vimdiff for the merge tool too, or set VS Code as default by command below: $ git config -global merge.tool vscode $ git config -global 'code -wait $MERGED' You can unset these configs by commands below: $ git config -global -unset diff.tool $ git config -global -unset 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" Search for Code and select the first result. #VISUAL STUDIO CODE GIT CONFIG INSTALL#The default git editor is Nano, I used to use vim as a git editor until I found VS Code is convenient for that. To install Visual Studio Code, launch the Ubuntu Software app from the applications menu. ![]() Use VS Code instead of nano as the default git editor
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |