DEV Community

Francis Jaleny
Francis Jaleny

Posted on

Git & GitHub: A Beginner's Guide to Version Control

What is Git and why does it matter?

Git is a "Version Control System." Think of it as a time machine for your code. If you make a mistake, you can go back to a version that worked perfectly.

How to track changes

  1. Initialize your project: git init
  2. Stage your files: git add .
  3. Save your progress: git commit -m "Describe your change"

Pushing to GitHub (The Cloud)

Once you've saved locally, send it to the world:
git push origin main

Pulling from GitHub

If you're working on a team and someone else updated the code:
git pull origin main

Top comments (0)