Week 8: Cherry Picking and Reflog Jonathan Miedel Alvin Wang Shannon Lee
Week 8: Cherry Picking and Reflog
Jonathan MiedelAlvin Wang
Shannon Lee
● We had a midterm
Last Week in Git Stuco
Midterm
Average = 45.375Standard Deviation = 4.81966
Exam Grade Distribution
● git cherry-pick <commit>● Like a mini rebase● It applies the changes of one commit to
your location● Can be used to select a single bug-fix
git cherry-pick
● Given branch with 3 commits● git rebase -i HEAD~3● Doesn’t work as you would expect● --root
Rebasing with the First Commit
● The reflog keeps track of updates to branches
● Allows us to reconnect dangling branches
git reflog
Undoing Rebase????!?!?!?!? WHAT!
● <commithash> or <partialcommithash>● <refname>● @{} - uses reflog
○ @{yesterday} ○ @{n}
● ^{n} - nth parent● ~{n} - nth generation ancestor
● A..B select commits in a range
Specifying Commits
● Hashing● Hooks● Bisect● Filter-branch● github pages
What should we cover?
Git internals
Next Week