Skip to content

Latest commit

 

History

History
84 lines (65 loc) · 3.77 KB

File metadata and controls

84 lines (65 loc) · 3.77 KB

Git

What you will learn

  • Expert in git
    • push/pull/branch/rebase/merge
  • Expert in github
    • repository management
    • security on the repository
    • user management
    • using github apps (eg: probot for repository management)
    • github actions

Learning Paths

Git

complexity Material
choose-your-path Github Labs
in-an-hour video tutorial
become-a-pro git scm guide
crash-course training-manual
crash-course training-manual
learn-with-fun gaming and learning 1 2 3

Github

prerequisite: knowledge on git. Look here

Usecases Yardstick

Git

  • You have pushed a commit to Github, undo the commit.
  • Amend the commit message of previous commits
  • undo local changes on certain files that are committed locally.
  • Reset the whole repository to remote or a particular commit.
  • You made a commit, undid the commit, but want those changes back.
  • You made lots of changes but realised you were on master/main and need those changes on a feature branch
  • Synchronise your lagging branch with master
  • You have some files that you want to keep, but not commit yet, but need to switch branches to make changes in another feature.
  • Bulk changes
    • you've been doing lots of commits, and you want to remove lots of commits (you got a better solution), reorder some, merge a few commits, and reword commit messages.
  • Resolve complex merge conflicts across multiple files

Github

Repository management and security

  • Create a repository and setup branch protection, with multiple reviewers
  • Protect certain directories with code owners
  • Use GitHub CLI to check pull requests etc.
  • Use Github on vscode/IDE (to see changes, diff, stage)
  • Coauthoring on Github
  • Signing commits on GitHub
  • Creating ssh, gpg, pat tokens with expiry and RBAC. Know the right RBAC needed for tokens.

** Github Actions**

  • Create a workflow to deploy build an app (anything - https://expressjs.com/en/starter/hello-world.html) and create a zip file that you can download unzip and run in local
  • Build a docker file into GitHub packages, tag it with the sha of the commit and tag it as latest as well, and test to pull and run the docker container on local
  • Write a composite action for printing "hello" or doing a build
  • Write a reusable workflow that you call to just do any of the above.
  • Handling secrets and Environments
    • Conditionally check the hierarchy of secrets to a value (org secret, repo secret, environment secret)