Module 1: Introduction to Git & Version Control
- What is Git? Why use it?
- How Git compares to other version control systems
- Key concepts: Repository, commits, branches, merge
Module 2: Setting Up Git
- Installing Git (Windows, macOS, Linux)
- Configuring Git (
git config
, global vs. local settings) - Setting up SSH keys for GitHub/GitLab
- Hands-on: Creating your first Git repository
Module 3: Git Basics – Working with Repositories
- Initializing a repository (
git init
) - Cloning a repository (
git clone
) - Staging changes (
git add
) - Committing changes (
git commit
) - Viewing history (
git log
,git show
) - Hands-on: Making and tracking changes in Git
Module 4: Branching & Merging
- Understanding Git branches (
git branch
) - Switching branches (
git checkout
,git switch
) - Merging changes (
git merge
) - Fast-forward vs. three-way merges
- Resolving merge conflicts
- Hands-on: Creating and merging branches
Break – 30 minutes
Module 5: Remote Repositories & Collaboration
- Working with remote repositories (
git remote add
,git fetch
) - Pushing and pulling changes (
git push
,git pull
) - Forking and cloning repositories
- Working with GitHub/GitLab
- Hands-on: Collaborating with Git using remote repositories
Module 6: Git Undo & Rewriting History
- Reverting changes (
git checkout
,git restore
) - Undoing commits (
git reset
,git revert
) - Working with stash (
git stash
) - Amending commits (
git commit --amend
) - Hands-on: Undoing changes and managing commit history
Module 7: Git Best Practices & Workflows
- Best practices for commit messages
- Feature branching, Git Flow, and trunk-based development
- Handling large repositories and optimizing performance
- Using
.gitignore
effectively - Hands-on: Applying best practices in a real-world Git workflow
Final Exercise & Q&A
Open Q&A session
Hands-on: Team collaboration scenario with Git workflows