Git 101: Version Control Fundamentals
Learn Git basics, its history (Linus Torvalds), and why version control matters. Cover GitHub, GitLab, Gitea, and more.
Downloads
Git 101: Version Control Fundamentals
Git is the foundation of modern software development. It's how we track changes, collaborate with others, and deploy code to production.
What is Git?
Git is a distributed version control system created by Linus Torvalds in 2005 to manage development of the Linux kernel. Today, it's the industry standard for software development used by millions of developers worldwide.
History
Before Git, developers used centralized version control systems (CVS, SVN) that required constant connection to a central server. Linus created Git to be:
- Distributed - Every developer has the full history
- Fast - Local operations are instant
- Reliable - Data integrity through SHA-1 hashing
- Branching-friendly - Create branches in seconds
Why Git Matters for AI Development
- Version Control - Track every prompt change, model switch, code iteration
- Experimentation - Try new AI features safely with branches
- Collaboration - Work with others or AI agents without conflicts
- Deployment - Vercel, Netlify, and other platforms deploy from Git
- Portfolio - Your GitHub is your resume for AI developers
- Rollback - Undo changes when AI suggestions go wrong
Essential Git Commands
# Initialize a repository
git init
# Stage changes
git add . # All files
git add filename.ts # Specific file
# Commit (save snapshot)
git commit -m "Your message describing changes"
# Push to remote (GitHub, GitLab, etc.)
git push origin main
# Pull from remote
git pull origin main
# Create and switch branches
git branch feature-name # Create
git checkout feature-name # Switch
git checkout -b new-feature # Create and switch
# Check status
git status
# View history
git log
# Clone repository
git clone https://github.com/username/repo.git
Git Platform Comparison
GitHub (Most Popular)
- Microsoft-owned, largest community (100M+ developers)
- GitHub Actions for CI/CD automation
- Free public and private repositories
- GitHub Copilot AI assistant available
- Best for: Open source, portfolio, collaboration
- This is where DevQuest.AI code lives
GitLab (Full DevOps Platform)
- More integrated CI/CD pipelines
- Self-hostable option (GitLab CE)
- Built-in project management and issue tracking
- Popular in enterprise environments
- Best for: Teams wanting all-in-one DevOps
Gitea (Lightweight and Self-Hosted)
- Open source, written in Go
- Fast and minimal resource usage
- Perfect for private servers or Raspberry Pi
- Simple to install and maintain
- Best for: Self-hosting, privacy, lightweight needs
Others Worth Knowing
Bitbucket - Atlassian's platform, integrates with Jira | bitbucket.org
SourceForge - Oldest platform, still active | sourceforge.net
Codeberg - Non-profit, privacy-focused | codeberg.org
Your First Git Workflow
- Create a GitHub account at github.com/signup
- Install Git: git-scm.com/downloads
- Configure Git with your name and email:
git config --global user.name "Your Name" git config --global user.email "your.email@example.com" - Create your first repository on GitHub
- Clone it locally or push an existing project
Throughout This Course
Every capstone project you build will be a Git repository. You will commit as you progress, push to GitHub, and deploy from your repo to Vercel. This is how professional developers work, and it's how you will work too.
Resources
- GitHub Getting Started Guide
- Pro Git Book (free online)
- GitHub Git Cheat Sheet
- Download our Git Cheat Sheet in the resources above