Browse Source

Morning workshops

Skia 3 years ago
  1. 62
      workshops/1 - Visualizing Git/
  2. 34
      workshops/2 - Git hooks, aliases, and bears oh my/

workshops/1 - Visualizing Git/

@ -0,0 +1,62 @@
# Visualizing git
Very awesome learning tool
## Basics
Refs are pointers
Can point to others refs or commits
## reflog
tracks HEAD's activity
commits on no branch are "dangling"
git checkout HEAD~2
git commit
git commit
git checkout -b new_branch
## merging, rebasing
`git merge feature_branch --no-ff`
forces a merge commit: easier to revert a new feature
reflog tracks all the steps of a rebase
`git reflog my_branch`
-> history of this branch
## working with remotes
`git pull` ~= `git fetch && git merge`
`git pull --rebase` ~= `git fetch && git rebase`
## amends, force pushs
`git reset --hard head@{1}` -> undo an amend
## cherry-pick and revert
`git cherry-pick <idofmergecommit>` -> not possible, need to precise on which
mainline to compare the changes
`git cherry-pick <idofmergecommit> -m1` -> set mainline to first parent of merge commit
works the same for `revert`ing a merge commit
## Conclusion
`reflog` is you friend!"
## Personal feedback
Good live presentation on an awesome tool that can be **really** awesome to
explain git concepts easily to someone.

workshops/2 - Git hooks, aliases, and bears oh my/

@ -0,0 +1,34 @@
# Git hooks, aliases, and bears oh my
Cool slides with most of the content:
## aliases
st = "!git status"
lg = "...."
lgg = "!git lg --graph"
Put `git-standup` in your `$PATH`, then `git standup` works
## hooks
Very useful to check many different things: commit messages, run tests, check
for naughty words in your code source, etc...
Advanced hooks can be used to add emojis based on a webcam picture of your face.
## Personal feedback
Nice and fun presentation, pushing aliases and hooks to a higher level!