Learn VSCode Git -- Sooner Than Later
Hey it's finally time to learn git on command line as well as in Visual Studio Code using its built-in UI for version control (no extensions needed!)
Table of contents
No headings in the article.
I get that you've been looking to learn git but haven't had the time. And to be honest it feels pointless to try using git without working on an actual project.
Still...it's important to know not just VSCode's Git extension (or rather built-in version control tab) but also how to use git on command line (same thing as VSCode terminal) which is one the most important skills you should have as a web developer.
So what are we going to learn in this vscode git tutorial?
This tutorial will show you how to commit, push, resolve merge conflicts (briefly) and reset HEAD (go to the state your code was in one of the previous commits.)
Having said this I recorded this SHORT video tutorial that walks you through the process in Visual Studio Code.
If you still don't know Git it's really worth going through this video to avoid any regrets later, especially after you're hired at your first job 🙂
Chapters In This Video
- 00:00 How to use Git in VSCode (command line and UI)
- 00:10 You don’t need Git Extensions just use built-in Source Control button
- 00:21 Download Git for Windows 7 10 11 32 bit or 64 bit
- 00:37 Install Git on Windows 7 10 11 32 64 bit
- 00:55 Make sure Git is installed by checking version on command line
- 01:08 Open GitHub and VSCode (Visual Studio Code) side by side
- 01:21 VSCode Git Create New Remote Repository
- 01:38 Git Init Instructions: Create a new repsository in terminal
- 01:44 Start New Git Project (Create New Folder)
- 02:04 Select Project Folder
- 02:24 Open New VSCode Terminal
- 02:35 run git init to initialize new git project on command line (bash, terminal)
- 03:37 stage commit push workflow
- 04:15 git add file
- 04:33 git commit -m “commit message”
- 05:03 git branch -M main (rename current branch)
- 05:27 git remote origin main (link local branch with remote branch)
- 05:53 git push -u origin main
- 06:35 Using vscode git UI
- 06:55 vscode git add file using the vscode UI
- 06:60 vscode git commit -m “commit message” using vscode UI (Ctrl Enter)
- 07:07 vscode git push (sync changes)
- 08:04 resolving merge conflict using vscode UI
- 08:53 git reset hard HEAD