Skip to content

Git and GitHub training session

Kenneth Hoste edited this page Jul 7, 2020 · 11 revisions

Date

Please fill out the doodle: https://doodle.com/poll/pemhunv7bvufhm4i If you consider yourself relatively new to Git & GitHub, please add *** next to your name in the doodle.

Date set: Friday July 3rd 2020, starting at 2pm (1-2h)

Slides / recording

Topics

GitHub

  • creating issues
    • linking to other issues/PRs
  • wiki
  • pull requests (PRs)
    • opening a pull request
      • allow edits
      • using fixes #123 in PR description
    • consulting changed files
    • creating a review with inline comments
      • making suggested changes
    • submitting an approved review
    • commit status & requirements for merging PRs
    • merging PRs
    • cleanup (deleting branch in fork)
    • project policy: don't merge your own PRs (no matter how trivial they are)
      • "two-pair-of-eyes" review policy
      • enforced in repos by requiring review before PRs can be merged to master branch
  • using the editor
    • watch out with branch and commit messages!
  • forking a repository
  • CI in GitHub Actions
  • projects

Git

  • cloning a repository (git clone)
  • remotes
    • git fetch
  • branches: creation, deletion, checkout (git branch, git checkout)
  • updating a repository clone (git pull)
  • pushing to a forked repository (git push)
    • git push --force (avoid it)
  • checking repo status (git status)
  • staging files & creating commits (git add, git commit)
    • attention to commit messages
  • checking changes in working directory (git diff)
    • git diff --stat, git diff --cached
  • consulting the log (git log)
  • git reset
    • git reset --hard (careful!)
  • stashing changes (git stash, git stash pop)
Clone this wiki locally