22:16 What Is Git?
Git Version Control System
Git is the distributed version control system used by virtually every software project. It tracks changes to your code over time, enables collaboration through branching and merging, and lets you revert to any previous state. GitHub, GitLab, and Bitbucket provide hosted Git repositories.
How Git Works
Git records every change as a commit — a snapshot of your entire project at a point in time. Branches let you work on features independently. Pull requests (GitHub) or merge requests (GitLab) facilitate code review before merging.
Git is distributed: every developer has a full copy of the repository history. You can commit, branch, and review history without network access. Push and pull sync changes with remote repositories (GitHub, GitLab).
The basic Git workflow: git add (stage changes), git commit (save a snapshot), git push (upload to remote). For teams: branch from main, commit your work, open a pull request, get review, merge.
Why Developers Use Git
Git is non-negotiable for software development. Every codebase, every team, every CI/CD pipeline uses Git. Understanding Git — branching, merging, rebasing, resolving conflicts — is a fundamental developer skill.
Key Concepts
- Commit — A snapshot of your project at a point in time — includes a message describing what changed and why
- Branch — An independent line of development — create branches for features, merge them when done
- Merge/Rebase — Combining branches. Merge creates a merge commit. Rebase replays commits on top of another branch for linear history.
- Pull Request — A GitHub/GitLab feature for proposing and reviewing changes before merging into the main branch
- Remote — A hosted repository (GitHub, GitLab) that team members push to and pull from
- Stash — Temporarily save uncommitted changes to switch branches — git stash saves, git stash pop restores
Essential Git Commands
# Start a new feature
git checkout -b feature/user-auth
# Stage and commit changes
git add src/auth.ts src/middleware.ts
git commit -m "Add JWT authentication middleware"
# Push and create pull request
git push -u origin feature/user-auth
# Update your branch with latest main
git fetch origin
git rebase origin/main
# Resolve conflicts, then continue
git add .
git rebase --continue Learn Git — Top Videos
22:16
1:12:07
36:57
8:18
11:58:41
1:23 Git Educators
@coreyms
Welcome to my Channel. This channel is focused on creating tutorials and walkthroughs for software developers, programme...
@techworldwithnana
Helping millions of engineers to advance their careers with DevOps & Cloud education 💙 I create new videos every month...
@github
GitHub is the AI-powered developer platform to build, scale, and deliver secure software. We make it easier for develope...
@codingentrepreneurs
Learn, Build, and Earn. Coding Entrepreneurs is here to help you learn the skills you need to build the projects you wan...
@pedrotechnologies
Web development tutorials for everyone. Learn ReactJS, NextJS, GraphQL, Express, MongoDB and more! Join PedroTech to mas...
@ashishps_1
👋 Hey, I'm Ashish, a Software Engineer with over 8 years of experience working in various domains like full stack, mach...
Frequently Asked Questions
Git vs GitHub — what's the difference?
Git is the version control system (software). GitHub is a hosting platform for Git repositories (service). Git works without GitHub. GitHub provides a web interface, pull requests, issues, and CI/CD on top of Git.
How do I undo a commit?
git revert <commit> creates a new commit that undoes the changes (safe). git reset --soft HEAD~1 un-commits but keeps changes staged (for fixing before re-committing). Never use reset --hard on shared branches.
Should I use merge or rebase?
Use merge for shared branches (preserves history). Use rebase for feature branches before merging (creates linear history). Never rebase commits that others have pulled.
Want a structured learning path?
Plan a Git Lesson →