Week 8: Cherry Picking and Reflog Shannon Lee Alvin Wang …dogfalo.github.io/git-stuco/week8/Week 8.pdf · git cherry-pick Like a mini rebase It applies the changes

Post on 27-Jun-2020

8 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

Transcript

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

top related