Learn Git In VSCode
Tags: git, vscode, github, productivity
Published: 2022-07-27 16:52:00

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. So I can understand that.

Still it's best to learn it now. Both on the command line and in VSCode's version control tab (perhaps the easiest way.)

{% embed https://www.youtube.com/watch?v=WAqWUfGIQYI %}

**So what are we going to learn in this vscode git tutorial?**

*This tutorial will show you how to [commit](https://youtu.be/WAqWUfGIQYI?t=273), [push](https://youtu.be/WAqWUfGIQYI?t=353), [resolve merge conflicts](https://youtu.be/WAqWUfGIQYI?t=484) (briefly) and [reset HEAD](https://youtu.be/WAqWUfGIQYI?t=533) (go to the state your code was in one of the previous commits.)*

You can also [subscribe to Web Development Tutorials](https://www.youtube.com/watch?v=WAqWUfGIQYI) on YouTube (Semicolon Tutorials) to see more videos like this published every week or so on VSCode, Python, JavaScript, etc.

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)](https://www.youtube.com/watch?v=WAqWUfGIQYI)
- 00:10 [You don’t need Git Extensions just use built-in Source Control button](https://youtu.be/WAqWUfGIQYI?t=10)
- 00:21 [Download Git for Windows 7 10 11 32 bit or 64 bit](https://youtu.be/WAqWUfGIQYI?t=21)
- 00:37 [Install Git on Windows 7 10 11 32 64 bit](https://youtu.be/WAqWUfGIQYI?t=37)
- 00:55 [Make sure Git is installed by checking version on command line](https://youtu.be/WAqWUfGIQYI?t=55)
- 01:08 [Open GitHub and VSCode (Visual Studio Code) side by side](https://youtu.be/WAqWUfGIQYI?t=68)
- 01:21 [VSCode Git Create New Remote Repository](https://youtu.be/WAqWUfGIQYI?t=81)
- 01:38 [Git Init Instructions: Create a new repsository in terminal](https://youtu.be/WAqWUfGIQYI)
- 01:44 [Start New Git Project (Create New Folder)](https://youtu.be/WAqWUfGIQYI?t=104)
- 02:04 [Select Project Folder](https://youtu.be/WAqWUfGIQYI?t=124)
- 02:24 [Open New VSCode Terminal](https://youtu.be/WAqWUfGIQYI?t=144)
- 02:35 [run git init to initialize new git project on command line (bash, terminal)](https://youtu.be/WAqWUfGIQYI?t=155)
- 03:37 [stage commit push workflow](https://youtu.be/WAqWUfGIQYI?t=218)
- 04:15 [git add file](https://youtu.be/WAqWUfGIQYI?t=255)
- 04:33 [git commit -m “commit message”](https://youtu.be/WAqWUfGIQYI?t=273)
- 05:03 [git branch -M main (rename current branch)](https://youtu.be/WAqWUfGIQYI?t=303)
- 05:27 [git remote origin main (link local branch with remote branch)](https://youtu.be/WAqWUfGIQYI?t=327)
- 05:53 [git push -u origin main](https://youtu.be/WAqWUfGIQYI?t=353)
- 06:35 [Using vscode git UI](https://youtu.be/WAqWUfGIQYI?t=395)
- 06:55 [vscode git add file using the vscode UI](https://youtu.be/WAqWUfGIQYI?t=415)
- 06:60 [vscode git commit -m “commit message” using vscode UI (Ctrl Enter)](https://youtu.be/WAqWUfGIQYI?t=420)
- 07:07 [vscode git push (sync changes)](https://youtu.be/WAqWUfGIQYI?t=427)
- 08:04 [resolving merge conflict using vscode UI](https://youtu.be/WAqWUfGIQYI?t=484)
- 08:53 [git reset hard HEAD](https://youtu.be/WAqWUfGIQYI?t=533)