Git Foundations - From Novice to Guru
Course length: 5 days
Dozens of commands! Hundreds of options! Git has dumbfounded sysadmins and developers alike since its appearance in 2005.
And yet, this ingenious software is among the most fantastically useful ever developed.
Learn Git from the ground up and the inside out with Git Foundations Training!
This class explores Git's internals in depth and includes practical exercises to gain familiarity and comfort in handling the nuts and bolts. It also covers collaboration with GitLab, which adds a powerful GUI and many features for software development.
Intended audience: Anyone who needs to use Git. The only requirement is familiarity with the Linux command line environment and ability to use a text editor.
Take Back to Work: Complete mastery of Git basics and the ability to comfortably and efficiently collaborate with Git. Also, ability to read and understand Git man pages.
Part I: Mastering the Basics
Theory - Mastering the Basics
This 15-30 minute section introduces the subject of version control and covers precise definitions for the most basic terminology to be used in the course.
This section introduces the basics of Graph Theory in sufficient depth to fully grasp the structure of Git internals.
This section covers the storage model of Git in detail, including the theoretical aspect (structure) of merge commits.
Orientation: "The determination of the relative position of something or someone (especially oneself)." This section covers the structure of Git branches and how the working directory relates to Git's internals.
Practical - Mastering the Basics
The practical section for Part I includes several hours of hands-on exercises, interspersed with question and answer periods and discussions. The exercises explore Git's internals in detail and allow students to link the theory learned so far to command line usage of Git, and why each command works as it does.
Students learn to navigate the history of a Git repository, to stage and commit files, to discard changes, to compare versions of files or projects, to branch out and to discard or merge branches, and how to easily handle merge conflicts.
Practicals are done with plain text files, not programming source code, to keep the focus on learning Git - not on learning programming.
Part II - Basic Collaboration
- What is a remote?
- Cloning a repository
- Remote branches
- Remote tracking branches
- Fetching changes
- Merging in changes from upstream
- Pushing to a different branch
- Rebasing before you push
Part III - Beyond the Basics
- Comparing branchines
- Pruning no-longer-needed branches
- Interactive rebasing
- Cherry-picking commits
- Reverting commits
- Pre- and post-commit hooks
- Garbage collection
Part IV - GitLab
- Merge Requests
- Bonus section: Integrating changes from a merge request with a messy history
- Protected Branches
- Forks or unprotected branches for merge requests
- Cross-referencing (commits/issues/merge requests)
- Continuous Integration