Git Basics 📦

Git is a distributed version control system that tracks changes in source code during software development. Key concepts include:

  • Staging Area (Index) - Where changes are prepared before committing
  • Repository - Central storage for project history
  • Commit - Permanent snapshot of your project
git_workflow

Branching and Merging 🌳

Branches allow parallel development:

  • main - Primary development branch
  • feature - For new functionality
  • bugfix - For resolving issues

When merging, Git combines changes from different branches. Use git merge to integrate work.

branching_and_merging

Commit Process 🖋️

A commit consists of:

  1. git add - Stage changes
  2. git commit - Create a commit with a message
  3. git push - Share commits with remote repository
commit_process

Worktree Structure 🧱

The worktree includes:

  • Working Directory - Files you're currently editing
  • Staging Area - Changes awaiting commit
  • Repository - Stored commits and history

Explore more about Git commands by visiting our Git Essentials Guide

View Interactive Git Diagram 🚀