My Git and VSCode Setup: Global Git Config, Extensions, and More (Video)
I share my Git configuration with VSCode in this 10 minute video. Short on time? Chapters, code, and links to resources are below the video.
00:00 Install Git
00:48 Global Git configuration for email, username
01:19 Demo of VSCode set as the default editor for commit messages (instead of Vim)
03:34 Global Git configuration of VSCode as default merge tool
04:18 Git settings in VSCode, for example Autofetch
05:26 GitLens extension
06:16 Reordering extensions in the left bar in VSCode
06:48 The Git Cheatsheet extension
08:25 The posh-git PowerShell module
Configure global Git preferences
Remember to modify the email address and name values at the end of the first two commands 😉
1 2 3 4 5 6 7 8 9 |
git config --global user.email yourname@domain.com git config --global user.name "First Last" git config --global core.editor "code --wait" git config --global merge.tool vscode git config --global mergetool.vscode.cmd "code --wait $MERGED" |
Links
- VSCode: https://code.visualstudio.com/
- Install Git: https://git-scm.com/downloads
- Chocolatey package manager: https://chocolatey.org/
- GitLens Extension – https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens
- Git Cheatsheet Extension – https://marketplace.visualstudio.com/items?itemName=dzhavat.git-cheatsheet
- PowerShell Extension – https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell
- posh-git PowerShell Module – https://github.com/dahlbyk/posh-git#installation