Skip to content

Git, GitHub & GitHub Actions

Collaborate cleanly and automate everything.

Master Git beyond add-commit-push, run a GitHub repo like a professional team, then automate testing, releases and cloud deployments with GitHub Actions, including reusable workflows and your own custom actions.

01Git, properly

How Git really works, so nothing surprises you.

  1. How Git works: objects, commits, HEADGit stores your project as a small set of objects: blobs for file contents, trees for folders and commits for snapshots. Branches and HEAD are just pointers to commits, which is why Git operations are fast and recoverable.11 min
  2. Branching & mergingFeature branches isolate work until it is ready. How you merge them decides what history looks like: a straight line, a visible merge commit or a single squashed commit.10 min
  3. Rebase, cherry-pick, reset & reflogRebase, cherry-pick and reset rewrite or copy commits to tidy local history. The reflog records where HEAD has been, so almost any 'lost' commit can be recovered.11 min
  4. Resolving conflictsA conflict happens when two branches change the same lines and Git cannot choose. Git marks the conflicting region in the file; you edit it to the correct result, then tell Git it is resolved.10 min

02Collaborating on GitHub

Run a repo the way good teams do.

  1. Repos, issues, labels & ProjectsA well-run repo explains itself with a README and license, captures work as issues, and shows progress on a Projects board. Templates and labels keep issues consistent and easy to triage.10 min
  2. Pull requests & code reviewA pull request proposes merging one branch into another and is where review happens. Small, focused PRs with a clear description get faster, better reviews.9 min
  3. Branch protection, rulesets & CODEOWNERSBranch protection and rulesets stop anyone from pushing straight to main. They require reviews and passing checks, and CODEOWNERS automatically requests review from the right people.10 min
  4. GitHub CLIThe GitHub CLI, gh, brings pull requests, issues and Actions runs to your terminal. It saves context switching and makes GitHub tasks easy to script.9 min

03GitHub Actions fundamentals

Workflows, jobs and steps.

  1. Workflows, events, jobs & stepsA workflow is a YAML file in .github/workflows. Events trigger it, it contains jobs that run on runners, and each job is a list of steps that run commands or reusable actions.11 min
  2. Runners & matrix buildsRunners are the machines that execute jobs, either hosted by GitHub or run by you. A matrix fans one job out into many parallel copies, such as every Python version on every OS.10 min
  3. Secrets, variables & environmentsSecrets hold sensitive values like API keys and are masked in logs; variables hold plain configuration. Environments group secrets for one target and can pause deployments until a reviewer approves.10 min
  4. Caching & artifactsCaches reuse files like downloaded dependencies across workflow runs to save time. Artifacts are files a run produces, such as build output or reports, shared between jobs or downloaded later.10 min

04Advanced Actions

Reuse, extend and secure your automation.

  1. Reusable workflows & composite actionsReusable workflows let many repos call one shared pipeline, while composite actions bundle several steps into one reusable step. Both stop you copying the same YAML everywhere.10 min
  2. Build a custom JavaScript or Docker actionA custom action packages logic behind a simple interface of inputs and outputs, defined in action.yml. JavaScript actions start fastest, Docker actions bring any toolchain, and composite actions just chain steps.11 min
  3. OIDC deployments to AWS/Azure/GCPWith OIDC, a workflow proves its identity to a cloud provider using a short-lived token signed by GitHub. The cloud trusts that token and returns temporary credentials, so no long-lived keys are stored in secrets.9 min
  4. Release automation & GitHub PackagesRelease automation turns a version tag into a changelog, a GitHub Release and published packages or images. Semantic versions tell users whether an upgrade is safe.10 min
  5. Dependabot, CodeQL & workflow permissionsWorkflows run with a GITHUB_TOKEN and can pull in third-party code, so they need guarding like production. Least-privilege permissions, Dependabot and CodeQL cover the main risks.10 min

05Project

Put it all together on a real repo.

  1. Full pipeline: test → build → release → deployThe project combines everything into one repo: protected main, CI on every PR, automated releases and an OIDC deployment behind an approval gate, all documented in the README.11 min