Git & GitHub for Beginners: The Ultimate VS Code Usage Guide (2026)
This will get you up and running with Git and its usage in VS Code Upon completion of this guide, you will be able to sucessfully: Initialize repositories, stage changes, handle merge conflicts, and push code to GitHub without ever leaving your editor. By the end, you'll have a professional version control workflow that saves you time and prevents "spaghetti code" disasters. π Resources & Links: ππ»My personal website: https://valerkahere.com/ ππ»Download VS Code: https://code.visualstudio.com/download ππ»Download Git: https://git-scm.com/install/ ππ»Access the presentation: https://github.com/valerkahere/youtube βTimestamps: 00:00:00 β Seizure Warning 00:00:07 β Intro & Overview 00:00:22 β Git Is a Time Machine 00:00:47 β Prerequisites 00:01:00 β Installing VS Code (Windows & macOS) 00:01:41 β Installing Git (Windows & macOS) 00:04:40 β What Is Git? 00:05:06 β Creating a Project Folder 00:06:14 β What Is git config? 00:06:45 β Disabling GitHub Copilot 00:08:00 β Initializing a Repository (git init) 00:09:36 β Git Configuration (git config) 00:12:29 β Common Git Problems 00:13:30 β Git Environments: Working, Staging, Commit 00:16:45 β Staging Files (git add .) 00:17:53 β Working Directory vs Staging Area 00:19:46 β Creating Commits (git commit -m) 00:22:55 β Committing the Visual Way (VS Code) 00:28:33 β Writing Good Commit Messages 00:29:43 β Fixing the Last Commit (git commit --amend) 00:31:23 β Understanding HEAD 00:34:27 β Fixing the Last Commit (Visual Way) 00:35:53 β Committing Without Staging (What Happens?) 00:36:25 β Git Status Indicators 00:37:32 β Ignoring Files (.gitignore) 00:41:14 β What Are Git Branches? 00:43:28 β Git Branching Workflow 00:54:16 β Remotes: git push & git pull 01:02:54 β Solving Merge Conflicts 01:07:26 β Git Diff & VS Code Diff View 01:12:16 β Final Notes 01:12:50 β Musical Outro π΅ π₯οΈ GIT COMMANDS CHEAT SHEET Set configuration values for your username and email git config --global user.name YOUR NAME git config --global user.email YOUR EMAIL Set default branch to main git config --global init.default branch main Get help on a command git help COMMAND git COMMAND -h Initialize a new git repository git init Clone a repository git clone REPOSITORY URL Add a file to the staging area git add FILE Add all file changes to the staging area git add --all git add -A git add . Check the unstaged changes git diff Commit the staged changes git commit -m "MESSAGE" Reset staging area to the last commit git reset Check the state of the working directory and the staging area git status Remove a file from the index and working directory git rm FILENAME Rename a file git mv (OLD NAME) (NEW NAME) List the commit history git log List all the local branches git branch Create a new branch git branch BRANCH NAME Rename the current branch git branch -m NEW BRANCH NAME Delete a branch git branch -d BRANCH NAME Switch to another branch git switch BRANCH NAME Merge specified branch into the current branch git merge BRANCH NAME Create a connection to a remote repository git remote add (NAME) (REPOSITORY URL) Push the committed changes to a remote directory git push (REMOTE) (BRANCH) Download the content from a remote repository git pull REMOTE Git Logo by Jason Long is licensed under the Creative Commons Attribution 3.0 Unported License.
Download
1 formatsVideo Formats
Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.