Complete Guide to Git

Complete Guide to Git

7h 40mIntermediate2024-09-24

Authors

Kevin Skoglund

Kevin Skoglund

Founder of NovaFabrica

Course details

The Git version control software is used daily by millions of developers around the world to manage project source code. This course provides a complete guide to everything needed to use this essential development tool effectively. Instructor Kevin Skoglund uses step-by-step examples to demonstrate key concepts, fundamental skills, and advanced techniques, while highlighting best practices and giving practical advice along the way. Learn to track changes to your code over time and to review and retrieve old versions. Discover how to create branches to try new ideas without impacting the main project and to merge those branches into the project when they are ready. See how to collaborate with other developers efficiently using a remote repository. Explore powerful Git tools like interactive staging, resetting, rebasing, and bisecting.

Skills covered

GitVersion ControlDevOps ToolsDevOpsOpen SourceSoftware DevelopmentOne-Off

Concepts

Introduction

  • Use Git version control software to manage project code

What Is Git

  • About version control
  • History
  • Distributed version control

Install Git

  • Installation
  • Configuration
  • Git help

Getting Started

  • Initialize a repository
  • Your first commit
  • Write commit message
  • View commits
  • The three trees
  • Hash values (SHA-1)

Make Changes to Files

  • Add files
  • Edit files
  • Review file changes
  • Delete files
  • Move and rename files

Use Git with an Existing Project

  • Introducing the project
  • Make and review file edits
  • Add, delete, and rename files
  • Compare commits
  • Make atomic commits
  • Challenge - Client edits
  • Solution - Client edits

Undo Changes

  • Restore changes to previous version
  • Restore other versions
  • Amend commits
  • Revert commits
  • Remove untracked files

Ignore Files

  • Ignore files in a project
  • Ideas on what to ignore
  • Globally ignore files
  • Track empty directories

Navigating the Commit Tree

  • Referencing commits
  • The HEAD pointer
  • Ancestry
  • Filter the commit long
  • Format the commit log

Branching

  • Branches overview
  • Create branches
  • Switch branches
  • Switch branches with uncommitted changes
  • Compare branches
  • Rename branches
  • Delete branches
  • Configure command prompt

Merging

  • Merging branches
  • Fast-forward merge vs. real merge
  • Merge conflicts
  • Resolve merge conflicts
  • Strategies to reduce conflicts
  • Challenge - Branching and merging
  • Solution - Branching and merging

Reset Branches

  • Reset types
  • Soft reset
  • Mixed reset
  • Hard reset

Stash Changes

  • Save changes in the stash
  • View stashed changes
  • Retrieve stashed changes
  • Delete stashed changes

Set Up a Remote

  • Local and remote repositories
  • Set up a GitHub account
  • Configure GitHub credentials
  • Add a remote repository
  • Create a remote branch
  • Clone a remote repository
  • Remote-tracking branches

Collaborate with a Remote

  • Working with a remote
  • Push changes to a remote
  • Fetch changes from a remote
  • Merge in fetched changes
  • Work with new remote branches
  • Push to an updated remote branch
  • Delete a remote branch
  • Prune stale branches
  • Collaboration workflow
  • Collaborating on open-source projects

Tagging

  • Create and delete tags
  • List tags
  • Push tags to a remote

Interactive Staging

  • About interactive staging
  • Interactive commands
  • Patch mode
  • Split a hunk
  • Edit a hunk

Share Select Changes

  • Cherry-picking commits
  • Resolve cherry-picking conflicts
  • Create diff patches
  • Apply diff patches
  • Create formatted patches
  • Apply formatted patches

Rebasing

  • Rebase commits
  • Perform a rebase
  • Merging vs. rebasing
  • Interactive rebasing
  • Squash commits
  • Pull rebase

Track Down Problems

  • Blame
  • Bisect
  • Challenge - Track down problems
  • Solution - Track down problems

Conclusion

  • Next steps
120,000 Toman