May the GIT --FORCE Be With You Mark Dorison @markdorison My git - - PowerPoint PPT Presentation

may the git force be with you mark dorison markdorison my
SMART_READER_LITE
LIVE PREVIEW

May the GIT --FORCE Be With You Mark Dorison @markdorison My git - - PowerPoint PPT Presentation

May the GIT --FORCE Be With You Mark Dorison @markdorison My git log Why are you here? No Drupal Here No Live Demos You Must Learn the Ways of the GIT --FORCE These Are the Commits You're Looking For Commit Structure nolan


slide-1
SLIDE 1

May the GIT --FORCE Be With You

slide-2
SLIDE 2

Mark Dorison @markdorison

slide-3
SLIDE 3

My git log

slide-4
SLIDE 4

Why are you here?

slide-5
SLIDE 5

No Drupal Here

slide-6
SLIDE 6

No Live Demos

slide-7
SLIDE 7

You Must Learn the Ways of the GIT --FORCE

slide-8
SLIDE 8
slide-9
SLIDE 9

These Are the Commits You're Looking For

slide-10
SLIDE 10

Commit Structure

slide-11
SLIDE 11

nolan  /v/w/d/outsideonline   master  git log 06dc921 
 commit 06dc921c67e4eb22ca1b4801d86cad5b42c434a5 Author: Mark Dorison <mark@chromatichq.com> Date: Tue Feb 16 13:42:08 2016 -0500 Updated constant name for Longform Alt Article. 
 
 Closes #2196.

slide-12
SLIDE 12

Commit Messages

slide-13
SLIDE 13

Capitalized, short (50 chars or less) summary. More detailed explanatory text, if necessary. Wrap it to about 72 characters or so. In some contexts, the first line is treated as the subject of an email and the rest of the text as the body. The blank line separating the summary from the body is critical (unless you omit the body entirely); tools like rebase can get confused if you run the two together. Further paragraphs come after blank lines. * Bullet points are okay, too. * Typically a hyphen or asterisk is used for the bullet, preceded by a single space, with blank lines in between, but conventions vary here. * Use a hanging indent. Closes gh-80.

slide-14
SLIDE 14

http:/ /bit.ly/chq-commit

slide-15
SLIDE 15
slide-16
SLIDE 16

All about pointers

slide-17
SLIDE 17
slide-18
SLIDE 18
slide-19
SLIDE 19
slide-20
SLIDE 20
slide-21
SLIDE 21

Git Doesn’t Do Files

slide-22
SLIDE 22

Git is distributed

slide-23
SLIDE 23

Remotes

slide-24
SLIDE 24

nolan  /d/m/c/recurly   8.x-1.x  git remote add origin git@github.com:ChromaticHQ/recurly.git

slide-25
SLIDE 25
slide-26
SLIDE 26
slide-27
SLIDE 27

nolan  /v/w/d/r/d/m/c/recurly   8.x-1.x  git remote add origin git@github.com:ChromaticHQ/recurly.git

slide-28
SLIDE 28
slide-29
SLIDE 29

The Tools

slide-30
SLIDE 30

nolan  /v/w/d/o/docroot   master  git status

slide-31
SLIDE 31

nolan  /v/w/d/o/docroot   master  git co 669-package-redirects 538-bundle-fix (Branch) acquia/buyers-guide-article-setup 669-package-redirects (Branch) acquia/buyers-guide-setup (Branch) 979-image-optimize (Branch) acquia/buyers-guide-swath (Branch) 979-imagemagick (Branch) acquia/contained-stacks-updates (Branch) …and 112 more rows

slide-32
SLIDE 32

nolan  /v/w/d/o/docroot   master  git co 979-image-optimize search: 97 979-image-optimize (Branch) acquia/979-imagemagick (Branch) origin/1397-timeline-articles 979-imagemagick (Branch) acquia/1397-timeline-articles (Branch) origin/1976-native-video-hook acquia/979-image-optimize (Branch) origin/979-image-optimize (Branch)

slide-33
SLIDE 33

git blame

slide-34
SLIDE 34

9a2820e3 (Nathan Haug 2014-07-08 18:39:35 -0700 796) /** 9a2820e3 (Nathan Haug 2014-07-08 18:39:35 -0700 797) * Format a Recurly coupon in a human-readable string. 9a2820e3 (Nathan Haug 2014-07-08 18:39:35 -0700 798) * 7c67baa0 (Mark Dorison 2015-12-23 02:37:18 +0000 799) * @param \Recurly_Coupon $coupon 9a2820e3 (Nathan Haug 2014-07-08 18:39:35 -0700 800) * The Recurly coupon object being formatted for display. 9a2820e3 (Nathan Haug 2014-07-08 18:39:35 -0700 801) * @param string $currency 9a2820e3 (Nathan Haug 2014-07-08 18:39:35 -0700 802) * The currency code in which the coupon is being redeemed. b435ebc1 (Alanna Burke 2015-11-12 14:43:29 -0800 803) * @param bool $html 9a2820e3 (Nathan Haug 2014-07-08 18:39:35 -0700 804) * Whether to return the formatted string with wrapping HTML or not. b435ebc1 (Alanna Burke 2015-11-12 14:43:29 -0800 805) * 9a2820e3 (Nathan Haug 2014-07-08 18:39:35 -0700 806) * @return string 9a2820e3 (Nathan Haug 2014-07-08 18:39:35 -0700 807) * The formatted string ready for printing. 9a2820e3 (Nathan Haug 2014-07-08 18:39:35 -0700 808) */ 7c67baa0 (Mark Dorison 2015-12-23 02:37:18 +0000 809) function recurly_format_coupon(\Recurly_Coupon $coupon, $currency, $html = FALSE) {

slide-35
SLIDE 35

git cherry-pick

slide-36
SLIDE 36
slide-37
SLIDE 37

git reset

slide-38
SLIDE 38
slide-39
SLIDE 39

nolan  /v/w/d/o/docroot   master  git reset HEAD^

slide-40
SLIDE 40
slide-41
SLIDE 41

git rebase

slide-42
SLIDE 42

Traditional rebase

slide-43
SLIDE 43
slide-44
SLIDE 44
slide-45
SLIDE 45

Reordering commits

slide-46
SLIDE 46

git rebase --interactive

slide-47
SLIDE 47

nolan  /v/w/d/o/docroot   master  git rebase -i HEAD^^^

slide-48
SLIDE 48

 nolan  /v/w/d/outsideonline   master  git rebase -i HEAD^^^
 pick 6455359 Add watermark image upload, dependent on Longform Alt pick 0f04bf0 Fix for interstitials on main image slideshows pick b32522d Complete functionality for outside_blog_migration # Rebase d7340fe..9704a9b onto d7340fe (3 command(s)) # # Commands: # p, pick = use commit # r, reword = use commit, but edit the commit message # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # f, fixup = like "squash", but discard this commit's log message # x, exec = run command (the rest of the line) using shell # d, drop = remove commit

slide-49
SLIDE 49

 nolan  /v/w/d/outsideonline   master  git rebase -i HEAD^^^
 pick 6455359 Add watermark image upload, dependent on Longform Alt pick 0f04bf0 Fix for interstitials on main image slideshows pick b32522d Complete functionality for outside_blog_migration # Rebase d7340fe..9704a9b onto d7340fe (3 command(s)) # # Commands: # p, pick = use commit # r, reword = use commit, but edit the commit message # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # f, fixup = like "squash", but discard this commit's log message # x, exec = run command (the rest of the line) using shell # d, drop = remove commit

slide-50
SLIDE 50

 nolan  /v/w/d/outsideonline   master  git rebase -i HEAD^^^
 pick 6455359 Add watermark image upload, dependent on Longform Alt pick 0f04bf0 Fix for interstitials on main image slideshows pick b32522d Complete functionality for outside_blog_migration # Rebase d7340fe..9704a9b onto d7340fe (3 command(s)) # # Commands: # p, pick = use commit # r, reword = use commit, but edit the commit message # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # f, fixup = like "squash", but discard this commit's log message # x, exec = run command (the rest of the line) using shell # d, drop = remove commit

slide-51
SLIDE 51

 nolan  /v/w/d/outsideonline   master  git rebase -i HEAD^^^
 pick 6455359 Add watermark image upload, dependent on Longform Alt pick 0f04bf0 Fix for interstitials on main image slideshows pick b32522d Complete functionality for outside_blog_migration # Rebase d7340fe..9704a9b onto d7340fe (3 command(s)) # # Commands: # p, pick = use commit # r, reword = use commit, but edit the commit message # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # f, fixup = like "squash", but discard this commit's log message # x, exec = run command (the rest of the line) using shell # d, drop = remove commit

slide-52
SLIDE 52

 nolan  /v/w/d/outsideonline   master  git rebase -i HEAD^^^
 pick 6455359 Add watermark image upload, dependent on Longform Alt pick 0f04bf0 Fix for interstitials on main image slideshows pick b32522d Complete functionality for outside_blog_migration # Rebase d7340fe..9704a9b onto d7340fe (3 command(s)) # # Commands: # p, pick = use commit # r, reword = use commit, but edit the commit message # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # f, fixup = like "squash", but discard this commit's log message # x, exec = run command (the rest of the line) using shell # d, drop = remove commit

slide-53
SLIDE 53

 nolan  /v/w/d/outsideonline   master  git rebase -i HEAD^^^
 r 6455359 Add watermark image upload, dependent on Longform Alt s 0f04bf0 Fix for interstitials on main image slideshows pick b32522d Complete functionality for outside_blog_migration # Rebase d7340fe..9704a9b onto d7340fe (3 command(s)) # # Commands: # p, pick = use commit # r, reword = use commit, but edit the commit message # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # f, fixup = like "squash", but discard this commit's log message # x, exec = run command (the rest of the line) using shell # d, drop = remove commit

slide-54
SLIDE 54

git commit --amend

slide-55
SLIDE 55
slide-56
SLIDE 56
slide-57
SLIDE 57

git push --force

slide-58
SLIDE 58

git bisect

slide-59
SLIDE 59
slide-60
SLIDE 60
slide-61
SLIDE 61

nolan  /v/w/d/outsideonline   master  git bisect start nolan  /v/w/d/outsideonline   master  git bisect bad nolan  /v/w/d/outsideonline   master  git co 1849-culture-analytics Switched to branch '1849-culture-analytics' Your branch is up-to-date with 'origin/1849-culture-analytics'. nolan  /v/w/d/outsideonline   1849-culture-analytics  git bisect good

slide-62
SLIDE 62

nolan  /v/w/d/outsideonline   master  git bisect start nolan  /v/w/d/outsideonline   master  git bisect bad nolan  /v/w/d/outsideonline   master  git co 1849-culture-analytics Switched to branch '1849-culture-analytics' Your branch is up-to-date with 'origin/1849-culture-analytics'. nolan  /v/w/d/outsideonline   1849-culture-analytics  git bisect good

slide-63
SLIDE 63

nolan  /v/w/d/outsideonline   1849-culture-analytics  git bisect good Bisecting: 125 revisions left to test after this (roughly 7 steps) [f7cba3d4215e95bc0af418cdcdc3934d0f9a4f9f] Merge pull request #2161 nolan  /v/w/d/outsideonline  ➦ f7cba3d 

slide-64
SLIDE 64

nolan  /v/w/d/outsideonline   1849-culture-analytics  git bisect good Bisecting: 125 revisions left to test after this (roughly 7 steps) [f7cba3d4215e95bc0af418cdcdc3934d0f9a4f9f] Merge pull request #2161 nolan  /v/w/d/outsideonline  ➦ f7cba3d 

slide-65
SLIDE 65
slide-66
SLIDE 66

nolan  /v/w/d/outsideonline  ➦ f7cba3d  git bisect good Bisecting: 62 revisions left to test after this (roughly 6 steps) [63b2a2a0d7a65c786cbf83036a964ef160522f41] Updates to main image/video

slide-67
SLIDE 67
slide-68
SLIDE 68
slide-69
SLIDE 69
slide-70
SLIDE 70
slide-71
SLIDE 71

nolan  /v/w/d/outsideonline  ➦ fd3fc7a  git bisect good 06dc921c67e4eb22ca1b4801d86cad5b42c434a5 is the first bad commit commit 06dc921c67e4eb22ca1b4801d86cad5b42c434a5 Author: Mark Dorison <mark@chromatichq.com> Date: Tue Feb 16 13:42:08 2016 -0500 Updated constant name for Longform Alt Article. 
 
 Closes #2196.

slide-72
SLIDE 72

nolan  /v/w/d/outsideonline  ➦ fd3fc7a  git bisect good 06dc921c67e4eb22ca1b4801d86cad5b42c434a5 is the first bad commit commit 06dc921c67e4eb22ca1b4801d86cad5b42c434a5 Author: Mark Dorison <mark@chromatichq.com> Date: Tue Feb 16 13:42:08 2016 -0500 Updated constant name for Longform Alt Article. 
 
 Closes #2196.

slide-73
SLIDE 73
slide-74
SLIDE 74

@ChromaticHQ