Filters
How to search
  • Plain words find names, texts and examples.
  • "two words" finds the exact phrase.
  • --name or -x finds an option.
  • #word looks only inside commands.
  • @grep finds lessons and labs that use grep.
  • Filters: cat:network · in:labs · in:notes · level:rhcsa · ch:8 · root:yes. Put ! before a word to leave it out. OR between words means one of them.
  • ↑ ↓ to move · Enter to open · Esc to close · / to search

Git and GitHub for admins

Version control for code, config and infrastructure: commits, branches, remotes, pull requests, undo, and keeping secrets out of Git.

Course by
Git project
Course code
Git
Version
Git 2.4x
Lessons
40

These summaries follow the public outline of the course. I wrote every lesson in my own words and tested the commands on RHEL 10. They are not Red Hat training material. Take the official course for the full content and the hands-on labs.

Next course: GitHub Actions

Parts and chapters

Part 1

Work alone

  1. 1Track changes with your first repositoryGit basics5 lessons
    Lessons
    1. 1.1 Set up Git once
    2. 1.2 Know the three areas
    3. 1.3 Make good commits
    4. 1.4 Look at the history
    5. 1.5 Ignore files
  2. 2Undo changes safelyUndoing things5 lessons
    Lessons
    1. 2.1 Undo changes in files
    2. 2.2 Fix the last commit
    3. 2.3 Move a branch back with reset
    4. 2.4 Undo a pushed commit with revert
    5. 2.5 Find "lost" commits with reflog
  3. 3Work in branches and merge themGit branching4 lessons
    Lessons
    1. 3.1 Create and switch branches
    2. 3.2 Merge a branch
    3. 3.3 Solve merge conflicts
    4. 3.4 Keep main safe

Part 2

Work in a team

  1. 4Share work with remote repositoriesWorking with remotes5 lessons
    Lessons
    1. 4.1 Clone a repository
    2. 4.2 Manage remotes
    3. 4.3 Fetch and pull
    4. 4.4 Push your branch
    5. 4.5 Understand tracking branches
  2. 5Keep a clean history with rebaseRebasing5 lessons
    Lessons
    1. 5.1 Rebase a branch on main
    2. 5.2 Solve conflicts during a rebase
    3. 5.3 Clean up commits interactively
    4. 5.4 Choose merge or rebase
    5. 5.5 Pick single commits
  3. 6Work with GitHub pull requestsGitHub collaboration5 lessons
    Lessons
    1. 6.1 Follow the GitHub flow
    2. 6.2 Write a good pull request
    3. 6.3 Review changes
    4. 6.4 Protect the main branch
    5. 6.5 Use issues and releases

Part 3

Tools and security

  1. 7Use stash, tags, bisect, blame and worktreesGit tools6 lessons
    Lessons
    1. 7.1 Put work aside with stash
    2. 7.2 Mark versions with tags
    3. 7.3 Find the bad commit with bisect
    4. 7.4 See who changed a line
    5. 7.5 Work on two branches at once
    6. 7.6 Search and clean the repository
  2. 8Secure your Git workGit security for DevSecOps5 lessons
    Lessons
    1. 8.1 Keep secrets out of Git
    2. 8.2 Scan for secrets
    3. 8.3 Stop mistakes with pre-commit hooks
    4. 8.4 Sign your commits
    5. 8.5 React to a leaked secret