Git & GitHub for Data Analysts
Back to Git, GitHub, and a Polished Repo

Using Git & GitHub in VSCode: Stage, Commit, and Push

A practical walkthrough of the Git workflow inside VS Code — stage, commit, and push.

15 minutesVideo LessonPDF notes
🎯 Free Guest Mode: You are learning for free. Sign in to save your completion progress and quiz answers.
Loading progress...

Key moments

  1. Git vs GitHub Fundamentals — Explains the distinction between local version control with Git and remote cloud hosting with GitHub.
  2. Environment Verification — Demonstrates terminal commands to check Git installation status and resolve system path issues.
  3. Repository Initialization — Initializes a Git repository in VS Code to establish local workspace tracking and generate metadata.
  4. Local Tracking and Commits — Creates a script file, reviews tracking states, discards changes, and makes an initial commit.
  5. GitHub Publishing and Pushing — Authenticates VS Code with GitHub, creates a private remote repository, and pushes local commits.
  6. Pulling Remote Changes — Edits a file on GitHub and uses the synchronize feature to pull updates into VS Code.
  7. Selective Staging Workflow — Separates multiple modified files to stage and commit one change while leaving others unstaged.
PDF notes

Frequently asked questions

What is the difference between committing and pushing?

Committing saves changes to your local Git database on your computer. Pushing uploads those local commits over the internet to GitHub.

Why should I stage files instead of committing everything at once?

Staging allows you to selectively choose which file modifications belong together, keeping each commit focused on a single task.

What happens if I discard changes in VS Code?

Discarding changes reverts the file to its last committed state, permanently erasing any uncommitted edits in that file.

Where does Git store repository tracking history?

Git stores all revision data, history, and config in a hidden `.git` folder located in the root of your workspace.

How was this lesson?

Your feedback helps us refine explanations and catch bugs.