Slide 1

Slide 1 text

May the GIT --FORCE Be With You

Slide 2

Slide 2 text

Mark Dorison @markdorison

Slide 3

Slide 3 text

My git log

Slide 4

Slide 4 text

Why are you here?

Slide 5

Slide 5 text

No Drupal Here

Slide 6

Slide 6 text

No Live Demos

Slide 7

Slide 7 text

You Must Learn the Ways of the GIT --FORCE

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

These Are the Commits You're Looking For

Slide 10

Slide 10 text

Commit Structure

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

Commit Messages

Slide 13

Slide 13 text

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 text

http://bit.ly/chq-commit

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

All about pointers

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

Git Doesn’t Do Files

Slide 22

Slide 22 text

Git is distributed

Slide 23

Slide 23 text

Remotes

Slide 24

Slide 24 text

nolan  /d/m/c/recurly   8.x-1.x  git remote add origin [email protected]:ChromaticHQ/recurly.git

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

nolan  /v/w/d/r/d/m/c/recurly   8.x-1.x  git remote add origin [email protected]:ChromaticHQ/recurly.git

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

The Tools

Slide 30

Slide 30 text

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

Slide 31

Slide 31 text

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

Slide 32

Slide 32 text

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

Slide 33

Slide 33 text

git blame

Slide 34

Slide 34 text

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, $h

Slide 35

Slide 35 text

git cherry-pick

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

git reset

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

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

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

git rebase

Slide 42

Slide 42 text

Traditional rebase

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

Reordering commits

Slide 46

Slide 46 text

git rebase --interactive

Slide 47

Slide 47 text

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

Slide 48

Slide 48 text

 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 text

 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 text

 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 text

 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 text

 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 text

 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 text

git commit --amend

Slide 55

Slide 55 text

No content

Slide 56

Slide 56 text

No content

Slide 57

Slide 57 text

git push --force

Slide 58

Slide 58 text

git bisect

Slide 59

Slide 59 text

No content

Slide 60

Slide 60 text

No content

Slide 61

Slide 61 text

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 text

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 text

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 text

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 text

No content

Slide 66

Slide 66 text

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 text

No content

Slide 68

Slide 68 text

No content

Slide 69

Slide 69 text

No content

Slide 70

Slide 70 text

No content

Slide 71

Slide 71 text

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

Slide 72

Slide 72 text

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

Slide 73

Slide 73 text

No content

Slide 74

Slide 74 text

@ChromaticHQ