Learn Git in a Day - The Visual Guide — book cover

What You'll Learn

About This Book

A structured walkthrough that takes you from zero Git knowledge to using it in a real workflow in a single day. It is not a command reference and not a list of recipes to memorize: it starts with why Git exists and how it thinks about your files and history, then moves into the workflows you use every day.

Most people pick up a handful of commands by copying from Stack Overflow and get by until a merge conflict or a detached HEAD shows they never built a mental model. This guide builds that model first, so you can reason your way through situations you have not seen before. No prior Git or version control experience is assumed — basic comfort with a terminal is enough.

Table of Contents

  1. Preface
    • What You'll Learn
    • About the Author
    • Join the Community
    • Your Feedback Matters
  2. How to Use This Guide
    • The Companion Kit
    • Heredoc
    • Long Commands
  3. Why Git Matters
    • Stop Naming Files "final_v2"
    • Meet Git
    • Why You Can't Skip This
    • Words You'll Hear a Lot
    • All You Need to Follow Along
  4. Get Git Up and Running
    • Install Git in 30 Seconds
    • Tell Git Who You Are
    • Make Sure It's Worked
    • What We've Done
  5. Your First Save Point
    • Set Up the Project Folder
    • Turn a Folder Into a Repo
    • See What Git Sees
    • Write Some Actual Code
    • The Checkpoint Before the Checkpoint
    • Save Your First Snapshot
    • Change, Stage, Commit - Repeat
    • Look Back at What You've Done
    • The Four-Step Rhythm
    • What We've Done
  6. Oops - How to Undo Anything
    • Throw Away Changes You Don't Want
    • Take a File Off the Stage
    • Undo a Commit Without Losing History
    • Put Your Work on Pause
    • Summary
    • What We've Done
  7. Work on Two Things at Once
    • What Branches Actually Are
    • Spin Up a New Branch
    • Jump Between Branches
    • Do Both at Once
    • Build a Feature in Isolation
    • Bring Your Work Back Together
    • Clean Up After Yourself
    • When Git Can't Figure It Out
    • See the Big Picture
    • Summary
    • What We've Done
  8. Put Your Code in the Cloud
    • Create Your GitLab Account
    • Set Up SSH So You Never Type a Password
    • Create a Home for Your Code on GitLab
    • Link Your Local Repo to GitLab
    • Send Your Code Up
    • Bring Changes Down
    • Fetch vs. Pull - What's the Difference?
    • Push a Branch to GitLab
    • Download an Existing Repo
    • Summary
    • What We've Done
  9. Code Review and Teamwork
    • How Real Teams Ship Code
    • Start a Feature the Right Way
    • Ask Your Team to Review
    • Give Feedback Like a Pro
    • Ship It
    • Write Descriptions People Actually Read
    • Commit Messages That Don't Suck
    • What a Normal Workday Looks Like
    • Summary
    • What We've Done
  10. Keep Your Branch in Sync
    • Why Your Branch Falls Behind
    • Watch It Happen
    • Replay Your Work on Top
    • Merge - Now It's Clean
    • Pull Without the Ugly Merge Commits
    • When Rebase Fights Back
    • The One Rule You Must Follow
    • Summary
    • What We've Done
  11. Keep Junk Out of Your Repo
    • Not Everything Belongs in Git
    • Write Your First .gitignore
    • Pattern Matching in a Nutshell
    • Already Tracked? Here's the Fix
    • A Real-World .gitignore
    • Ignore Files Across Every Repo
    • Summary
    • What We've Done
  12. Mark the Milestones
    • Tag Your First Release
    • Two Kinds of Tags
    • List and Inspect Tags
    • Tag a Commit After the Fact
    • Share Your Tags with the Team
    • Travel Back to a Tag
    • Remove a Tag You Don't Need
    • How to Name Your Tags
    • Tags vs. Releases - What's the Difference?
    • Summary
    • What We've Done
  13. Tricks That Save You Time
    • Stop Typing the Same Commands
    • Find Out Who Wrote That Line
    • Compare Changes Like a Detective
    • Time-Travel to an Old Commit
    • Fix Your Last Commit
    • Prune Dead Branches
    • Summary
    • What We've Done
  14. Your Git Cheatsheet
    • Setup
    • Starting a Project
    • Day-to-Day Workflow
    • Viewing History
    • Undoing Things
    • Stashing
    • Branches
    • Remotes
    • Rebase
    • Tags
    • Ignoring Files
    • SSH Authentication
    • Aliases
    • Merge Conflicts
    • When Things Go Wrong
  15. Beyond the Command Line
    • GUI Clients
    • Terminal UI and CLI Enhancements
    • Hooks and Quality Gates
    • Multi-Repository Management
    • History Rewriting and Cleanup
    • Release and Commit Workflow
    • Security and Signing
    • Analytics and Visualization
    • Diff and Merge Tools
    • Large Files and Repository Extensions
    • Repository Utilities
    • Self-Hosted Git Servers
  16. Afterword
    • Let's Stay Connected
    • Feedback

Who This Is For

Students, self-taught programmers and career switchers who have heard of Git and never properly sat down with it.

About the Author

Aymen El Amri is a software engineer, author and founder. He runs eralabs, built FAUN.dev, and writes about cloud native systems, AI engineering and developer tooling. More about Aymen.

More by Aymen El Amri