Initialize a Git Repo in VSCode: Tips on Configuring Your Default Branch and Adding a GitIgnore
At times you may wish to initialize a new Git repo on your client machine. Redgate's Kendra Little shares some tips for doing this in VSCode.
00:00 When you might want to do this
00:29 Configuring your default branch with: git config --global init.defaultBranch branchname
00:50 Creating and opening a new folder
01:00 Initializing a new repo in that folder
01:20 Automatically creating a .gitignore file with the gitignore extension
02:30 Committing my .gitignore
02:50 Where to go from here
Links:
- Documentation on git config https://git-scm.com/docs/git-config
- Gitignore extension: https://marketplace.visualstudio.com/items