Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Git Better

Git Better

Are you a Git user who feels like they’re only using a fraction of the functionality? Do you find yourself knowing there’s more to it, but are worried about screwing up your repo? In this session we’ll dive into a few of the more powerful commands that will make us better, more confident, more organized developers. Come out of the talk understanding more about the way Git stores your data, how to recover from mistakes, and how to dive more deeply into the information stored in your repository.

Alases gisted at https://gist.github.com/orderedlist/4bc1bb427e949bc728fb

Ae14cc4491ac334f9cd23f9f93b4305e?s=128

Steve Smith
PRO

June 23, 2015
Tweet

Transcript

  1. Git Better Becoming a more skillful collaborator A talk by

    orderedlist
  2. Trees Snapshots of a directory

  3. Working Directory file1 v1 file2 v1 file3 v1

  4. $ git init

  5. Working Directory Index file1 v1 file2 v1 file3 v1 HEAD

    → master
  6. $ git status On branch master Initial commit Untracked files:

    (use "git add <file>..." to include in what will be committed) file1 file2 file3 nothing added to commit but untracked files present (use "git add" to track)
  7. Working Directory Index file1 v1 file2 v1 file3 v1 HEAD

    → master Unstaged Diff Staged Diff
  8. $ git add file1

  9. Working Directory Index file1 v1 file2 v1 file3 v1 file1

    v1 HEAD → master
  10. $ git status On branch master Initial commit Changes to

    be committed: (use "git rm --cached <file>..." to unstage) new file: file1 Untracked files: (use "git add <file>..." to include in what will be committed) file2 file3
  11. Working Directory Index file1 v1 file2 v1 file3 v1 file1

    v1 HEAD → master Unstaged Diff Staged Diff
  12. $ git commit -m "Initial commit" [master (root-commit) e327139] Initial

    commit 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 file1
  13. Working Directory Index file1 v1 file2 v1 file3 v1 file1

    v1 HEAD → master file1 v1 e327139
  14. Working Directory Index file1 v1 file2 v1 file3 v1 file1

    v1 HEAD → master file1 v1 e327139
  15. $ git add file2 file3 On branch master Changes to

    be committed: (use "git reset HEAD <file>..." to unstage) new file: file2 new file: file3
  16. Working Directory Index file1 v1 file2 v1 file3 v1 file1

    v1 HEAD → master file1 v1 SHA: e327139 file2 v1 file3 v1
  17. $ git commit -m "Adding files" [master cde7f23] Adding files

    2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 file2 create mode 100644 file3
  18. Working Directory Index file1 v1 file2 v1 file3 v1 file1

    v1 HEAD → master file1 v1 SHA: e327139 file2 v1 file3 v1 file1 v1 SHA: cde7f23 file2 v1 file3 v1
  19. Working Directory Index file1 v1 file2 v1 file3 v1 file1

    v1 HEAD → master file1 v1 SHA: e327139 file2 v1 file3 v1 file1 v1 SHA: cde7f23 file2 v1 file3 v1
  20. $ echo v2 > file1

  21. Working Directory Index file1 v2 file2 v1 file3 v1 file1

    v1 HEAD → master file1 v1 SHA: e327139 file2 v1 file3 v1 file1 v1 SHA: cde7f23 file2 v1 file3 v1
  22. $ git status On branch master Changes not staged for

    commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: file1 no changes added to commit (use "git add" and/or "git commit -a")
  23. $ git add file1

  24. Working Directory Index file1 v2 file2 v1 file3 v1 file1

    v1 HEAD → master file1 v1 SHA: e327139 file2 v1 file3 v1 file1 v1 SHA: cde7f23 file2 v1 file3 v1 file1 v2
  25. $ git status On branch master Changes to be committed:

    (use "git reset HEAD <file>..." to unstage) modified: file1
  26. $ git commit -m "Modify file1" [master d59baaf] Modify file1

    1 file changed, 1 insertion(+)
  27. Working Directory Index file1 v2 file2 v1 file3 v1 file1

    v1 HEAD → master file1 v1 SHA: e327139 file2 v1 file3 v1 file1 v1 SHA: cde7f23 file2 v1 file3 v1 file1 v2 file1 v1 file2 v1 file3 v1 file1 v2 SHA: d59baaf
  28. Working Directory Index file1 v2 file2 v1 file3 v1 file1

    v1 HEAD → master file1 v1 SHA: e327139 file2 v1 file3 v1 file1 v1 SHA: cde7f23 file2 v1 file3 v1 file1 v2 file1 v1 file2 v1 file3 v1 file1 v2 SHA: d59baaf
  29. Reset 3 ways to move backward

  30. Soft Reset Move HEAD

  31. $ git reset --soft HEAD~1

  32. Working Directory Index file1 v2 file2 v1 file3 v1 file1

    v1 HEAD → master file2 v1 file3 v1 file1 v1 SHA: e327139 file1 v1 SHA: cde7f23 file2 v1 file3 v1 file1 v2 file1 v1 file2 v1 file3 v1 file1 v2 SHA: d59baaf
  33. Working Directory Index file1 v2 file2 v1 file3 v1 file1

    v1 HEAD → master file2 v1 file3 v1 file1 v1 SHA: e327139 file1 v1 SHA: cde7f23 file2 v1 file3 v1 file1 v2
  34. $ git config --global alias.undo 'reset --soft HEAD~1'

  35. $ git undo

  36. Mixed Reset Move HEAD and update the index

  37. $ git reset HEAD~1

  38. Working Directory Index file1 v2 file2 v1 file3 v1 file1

    v1 HEAD → master file2 v1 file3 v1 file1 v1 SHA: cde7f23 file2 v1 file3 v1 file1 v1 SHA: e327139 file1 v2 file1 v1 file2 v1 file3 v1 file1 v2 SHA: d59baaf file1 v1 file2 v1 file3 v1 file1 v1 SHA: cde7f23 file2 v1 file3 v1
  39. Working Directory Index file1 v2 file2 v1 file3 v1 file1

    v1 HEAD → master file2 v1 file3 v1 file1 v1 SHA: cde7f23 file2 v1 file3 v1 file1 v1 SHA: e327139 file1 v2 file1 v1 file2 v1 file3 v1 file1 v1 SHA: cde7f23 file2 v1 file3 v1
  40. Working Directory Index file1 v2 file2 v1 file3 v1 file1

    v1 HEAD → master file2 v1 file3 v1 file1 v1 SHA: cde7f23 file2 v1 file3 v1 file1 v1 SHA: e327139 file1 v2 file1 v1 file2 v1 file3 v1 file1 v1 SHA: cde7f23 file2 v1 file3 v1
  41. $ git reset HEAD

  42. Working Directory Index file3 v1 file1 v1 HEAD → master

    file2 v2 file3 v1 file1 v1 SHA: e327139 file1 v3 file1 v1 file2 v1 file3 v1 file1 v2 file1 v1 SHA: cde7f23 file2 v1 file3 v1 file1 v1 file2 v1 file3 v1 file1 v2 SHA: d59baaf file2 v2 file1 v3
  43. Working Directory Index file3 v1 file1 v1 HEAD → master

    file2 v2 file3 v1 file1 v1 SHA: e327139 file1 v3 file1 v1 file2 v1 file3 v1 file1 v2 file1 v1 SHA: cde7f23 file2 v1 file3 v1 file1 v1 file2 v1 file3 v1 file1 v2 SHA: d59baaf file2 v2 file1 v3
  44. $ git reset HEAD -- file1

  45. $ git config --global alias.unstage 'reset HEAD --'

  46. $ git unstage

  47. $ git unstage file1

  48. Hard Reset Move HEAD, update the index and working directory

  49. Caution Hard reset can cause data loss

  50. $ git reset --hard HEAD~1

  51. Working Directory Index file1 v2 file2 v1 file3 v1 file1

    v1 HEAD → master file2 v1 file3 v1 file1 v1 SHA: cde7f23 file2 v1 file3 v1 file1 v1 SHA: e327139 file1 v2 file1 v1 file2 v1 file3 v1 file1 v2 SHA: d59baaf file1 v1 file2 v1 file3 v1 file1 v1 file2 v1 file3 v1 file1 v1 SHA: cde7f23 file2 v1 file3 v1
  52. Working Directory Index file1 v2 file2 v1 file3 v1 file1

    v1 HEAD → master file2 v1 file3 v1 file1 v1 SHA: cde7f23 file2 v1 file3 v1 file1 v1 SHA: e327139 file1 v2 file1 v1 file2 v1 file3 v1 file1 v1 file2 v1 file3 v1 file1 v1 SHA: cde7f23 file2 v1 file3 v1
  53. Working Directory Index file1 v2 file2 v1 file3 v1 file1

    v1 HEAD → master file2 v1 file3 v1 file1 v1 SHA: cde7f23 file2 v1 file3 v1 file1 v1 SHA: e327139 file1 v2 file1 v1 file2 v1 file3 v1 file1 v1 file2 v1 file3 v1 file1 v1 SHA: cde7f23 file2 v1 file3 v1
  54. $ git reset --hard HEAD

  55. Working Directory Index file3 v1 file1 v1 HEAD → master

    file2 v1 file3 v1 file1 v1 SHA: e327139 file1 v2 file1 v1 file2 v1 file3 v1 file1 v2 file2 v2 file1 v3 file1 v1 SHA: cde7f23 file2 v1 file3 v1 file1 v1 file2 v1 file3 v1 file1 v2 file1 v1 file2 v1 file3 v1 file1 v2 SHA: d59baaf
  56. Working Directory Index file3 v1 file1 v1 HEAD → master

    file2 v1 file3 v1 file1 v1 SHA: e327139 file1 v2 file2 v2 file1 v3 file1 v1 file2 v1 file3 v1 file1 v2 file1 v1 SHA: cde7f23 file2 v1 file3 v1 file1 v1 file2 v1 file3 v1 file1 v2 file1 v1 file2 v1 file3 v1 file1 v2 SHA: d59baaf
  57. Not recommended without saving to the repo first

  58. Stash Save work for later

  59. Working Directory Index file3 v1 file1 v1 HEAD → master

    file2 v1 file3 v1 file1 v1 SHA: e327139 file1 v2 file1 v1 file2 v1 file3 v1 file1 v2 file1 v1 SHA: cde7f23 file2 v1 file3 v1 file1 v1 file2 v1 file3 v1 file1 v2 SHA: d59baaf file2 v2 file1 v3
  60. $ git stash -u

  61. $ git stash save -u 'Description'

  62. Working Directory Index HEAD → master file1 v1 SHA: e327139

    file1 v1 file2 v1 file3 v1 file1 v2 file1 v1 SHA: cde7f23 file2 v1 file3 v1 file1 v1 file2 v1 file3 v1 file1 v2 file1 v1 file2 v1 file3 v1 file1 v2 SHA: d59baaf file3 v1 file1 v1 file2 v1 file3 v1 file1 v2 file2 v2 file1 v3 file3 v1 file2 v2 file1 v3
  63. file3 v1 file1 v1 file2 v2 file3 v1 file1 v2

    file2 v2 file1 v3 Working Directory Index HEAD → master file1 v1 SHA: e327139 file1 v1 file2 v1 file3 v1 file1 v2 file1 v1 SHA: cde7f23 file2 v1 file3 v1 file1 v1 file2 v1 file3 v1 file1 v2 file1 v1 file2 v1 file3 v1 file1 v2 SHA: d59baaf file3 v1 file2 v2 file1 v3 stash@{0}
  64. file3 v1 file1 v1 file2 v2 file3 v1 file1 v2

    file2 v2 file1 v3 Working Directory Index HEAD → master file1 v1 SHA: e327139 file1 v1 file2 v1 file3 v1 file1 v2 file1 v1 SHA: cde7f23 file2 v1 file3 v1 file1 v1 file2 v1 file3 v1 file1 v2 file1 v1 file2 v1 file3 v1 file1 v2 SHA: d59baaf stash@{0} file3 v1 file2 v2 file1 v3
  65. $ echo v2 > file3

  66. file3 v1 file1 v1 file2 v2 file3 v1 file1 v2

    file2 v2 file1 v3 Working Directory Index HEAD → master file1 v1 SHA: e327139 file1 v1 file2 v1 file3 v1 file1 v2 file1 v1 SHA: cde7f23 file2 v1 file3 v1 file1 v1 file2 v1 file3 v2 file1 v2 file1 v1 file2 v1 file3 v1 file1 v2 SHA: d59baaf stash@{0} file3 v1 file2 v2 file1 v3
  67. $ git add file3

  68. file3 v1 file1 v1 file2 v2 file3 v1 file1 v2

    file2 v2 file1 v3 Working Directory Index HEAD → master file1 v1 SHA: e327139 file1 v1 file1 v1 SHA: cde7f23 file2 v1 file3 v1 file1 v1 file2 v1 file3 v2 file1 v2 file1 v1 file2 v1 file3 v1 file1 v2 SHA: d59baaf stash@{0} file2 v1 file1 v2 file3 v2 file3 v1 file2 v2 file1 v3
  69. $ git commit -m 'Modify file3'

  70. file3 v1 file1 v1 file2 v2 file3 v1 file1 v2

    file2 v2 file1 v3 Working Directory Index HEAD → master file1 v1 file1 v1 SHA: cde7f23 file2 v1 file3 v1 file1 v1 file2 v1 file3 v2 file1 v2 file1 v1 file2 v1 file3 v1 file1 v2 SHA: d59baaf stash@{0} file2 v1 file1 v2 file3 v2 file1 v1 file2 v1 file3 v2 file1 v2 SHA: 04ed46a file3 v1 file2 v2 file1 v3
  71. $ git stash list stash@{0}: WIP on master: d59baaf Modify

    file1
  72. $ git stash show file1 | 2 +- file2 |

    1 + 2 files changed, 2 insertions(+), 1 deletion(-)
  73. $ git stash show stash@{0}

  74. $ git stash pop

  75. file3 v1 file1 v1 file2 v2 file3 v1 file1 v2

    file2 v2 file1 v3 Working Directory Index HEAD → master file1 v1 file1 v1 SHA: cde7f23 file2 v1 file3 v1 file1 v1 file2 v1 file3 v2 file1 v2 file1 v1 file2 v1 file3 v1 file1 v2 SHA: d59baaf file3 v1 file2 v2 file1 v3 stash@{0} file2 v1 file1 v2 file3 v2 file1 v1 file2 v1 file3 v2 file1 v2 SHA: 04ed46a
  76. file3 v1 file1 v1 file2 v2 file3 v1 file1 v2

    file2 v2 file1 v3 Working Directory Index HEAD → master file1 v1 file1 v1 SHA: cde7f23 file2 v1 file3 v1 file1 v1 file2 v1 file3 v2 file1 v2 file1 v1 file2 v1 file3 v1 file1 v2 SHA: d59baaf file3 v2 file2 v2 file1 v3 file2 v1 file1 v2 file3 v2 file1 v1 file2 v1 file3 v2 file1 v2 SHA: 04ed46a
  77. $ git stash apply

  78. file3 v1 file1 v1 file2 v2 file3 v1 file1 v2

    file2 v2 file1 v3 Working Directory Index HEAD → master file1 v1 file1 v1 SHA: cde7f23 file2 v1 file3 v1 file1 v1 file2 v1 file3 v2 file1 v2 file1 v1 file2 v1 file3 v1 file1 v2 SHA: d59baaf file3 v1 file2 v2 file1 v3 stash@{0} file2 v1 file1 v2 file3 v2 file1 v1 file2 v1 file3 v2 file1 v2 SHA: 04ed46a file3 v1 file2 v2 file1 v3
  79. file3 v1 file1 v1 file2 v2 file3 v1 file1 v2

    file2 v2 file1 v3 Working Directory Index HEAD → master file1 v1 file1 v1 SHA: cde7f23 file2 v1 file3 v1 file1 v1 file2 v1 file3 v2 file1 v2 file1 v1 file2 v1 file3 v1 file1 v2 SHA: d59baaf file3 v1 file2 v2 file1 v3 stash@{0} file2 v1 file1 v2 file3 v2 file1 v1 file2 v1 file3 v2 file1 v2 SHA: 04ed46a file3 v2 file2 v2 file1 v3
  80. $ git stash branch new-branch-name stash@{0}

  81. Reflog A meta repo for your repo

  82. Working Directory Index file1 v2 file2 v1 file3 v1 file1

    v1 HEAD → master file2 v1 file3 v1 file1 v1 SHA: cde7f23 file2 v1 file3 v1 file1 v1 SHA: e327139 file1 v2 file1 v1 file2 v1 file3 v1 file1 v2 SHA: d59baaf file1 v1 file2 v1 file3 v1 file1 v1 file2 v1 file3 v1 file1 v1 SHA: cde7f23 file2 v1 file3 v1
  83. Working Directory Index file1 v2 file2 v1 file3 v1 file1

    v1 HEAD → master file2 v1 file3 v1 file1 v1 SHA: cde7f23 file2 v1 file3 v1 file1 v1 SHA: e327139 file1 v2 file1 v1 file2 v1 file3 v1 file1 v1 file2 v1 file3 v1 file1 v1 SHA: cde7f23 file2 v1 file3 v1
  84. Working Directory Index file1 v2 file2 v1 file3 v1 file1

    v1 HEAD → master file2 v1 file3 v1 file1 v1 SHA: cde7f23 file2 v1 file3 v1 file1 v1 SHA: e327139 file1 v2 file1 v1 file2 v1 file3 v1 file1 v1 file2 v1 file3 v1 file1 v1 SHA: cde7f23 file2 v1 file3 v1
  85. $ git log commit cde7f23cb3d8a3de59b7042e21ea04953d4f3ea3 Author: Steve Smith <steve@orderedlist.com> Date:

    Fri Jun 19 21:41:43 2015 -0400 Adding files commit e327139d70d9a07ddcca0a83833f113ecffb6780 Author: Steve Smith <steve@orderedlist.com> Date: Fri Jun 19 21:05:00 2015 -0400 Initial commit
  86. $ git reflog cde7f23 HEAD@{0}: reset: moving to HEAD~ d59baaf

    HEAD@{1}: commit: Modify file1 cde7f23 HEAD@{2}: commit: Adding files e327139 HEAD@{3}: commit (initial): Initial commit
  87. $ git reset --hard d59baaf

  88. $ git log commit d59baafe0279d67a527ee095d0022d8a44aa0017 Author: Steve Smith <steve@orderedlist.com> Date:

    Sat Jun 20 10:08:21 2015 -0400 Modify file1 commit cde7f23cb3d8a3de59b7042e21ea04953d4f3ea3 Author: Steve Smith <steve@orderedlist.com> Date: Fri Jun 19 21:41:43 2015 -0400 Adding files commit e327139d70d9a07ddcca0a83833f113ecffb6780 Author: Steve Smith <steve@orderedlist.com> Date: Fri Jun 19 21:05:00 2015 -0400 Initial commit
  89. $ git checkout -b new-branch-name d59baaf

  90. $ git reflog show feature-branch

  91. $ git reflog show master@{1.week.ago}

  92. Interactive Rebase Rewriting history

  93. $ git log 98e64d6 Fix display bug Fixes #145 cac9ec3

    Update comparison text 23c925b Actually Fix display bug Fixes d210f51 I hate display bugs ada9e45 Better markup for container 19181bd /khanify display bugs aca26af F$#*&%*!!! 575c779 I am dumb
  94. Fix before you push Force pushing is just rude

  95. $ git rebase -i HEAD~8

  96. pick 98e64d6 Fix display bug Fixes #145 pick cac9ec3 Update

    comparison text pick 23c925b Actually Fix display bug Fixes pick d210f51 I hate display bugs pick ada9e45 Better markup for container pick 19181bd /khanify display bugs pick aca26af F$#*&%*!!! pick 575c779 I am dumb # Rebase a3464a3..33854e7 onto a3464a3 ( 2 TODO item(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 # # These lines can be re-ordered; they are executed from top to bottom. # # If you remove a line here THAT COMMIT WILL BE LOST. # # However, if you remove everything, the rebase will be aborted.
  97. pick 98e64d6 Fix display bug Fixes #145 pick cac9ec3 Update

    comparison text pick 23c925b Actually Fix display bug Fixes pick d210f51 I hate display bugs pick ada9e45 Better markup for container pick 19181bd /khanify display bugs pick aca26af F$#*&%*!!! pick 575c779 I am dumb # Rebase a3464a3..33854e7 onto a3464a3 ( 2 TODO item(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 # # These lines can be re-ordered; they are executed from top to bottom. # # If you remove a line here THAT COMMIT WILL BE LOST. # # However, if you remove everything, the rebase will be aborted.
  98. pick 98e64d6 Fix display bug Fixes #145 r cac9ec3 Update

    comparison text pick 23c925b Actually Fix display bug Fixes pick d210f51 I hate display bugs pick ada9e45 Better markup for container pick 19181bd /khanify display bugs pick aca26af F$#*&%*!!! pick 575c779 I am dumb # Rebase a3464a3..33854e7 onto a3464a3 ( 2 TODO item(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 # # These lines can be re-ordered; they are executed from top to bottom. # # If you remove a line here THAT COMMIT WILL BE LOST. # # However, if you remove everything, the rebase will be aborted.
  99. pick 98e64d6 Fix display bug Fixes #145 r cac9ec3 Update

    comparison text pick 23c925b Actually Fix display bug Fixes pick d210f51 I hate display bugs pick ada9e45 Better markup for container pick 19181bd /khanify display bugs pick aca26af F$#*&%*!!! pick 575c779 I am dumb # Rebase a3464a3..33854e7 onto a3464a3 ( 2 TODO item(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 # # These lines can be re-ordered; they are executed from top to bottom. # # If you remove a line here THAT COMMIT WILL BE LOST. # # However, if you remove everything, the rebase will be aborted.
  100. pick 98e64d6 Fix display bug Fixes #145 f 23c925b Actually

    Fix display bug Fixes r cac9ec3 Update comparison text pick d210f51 I hate display bugs pick ada9e45 Better markup for container pick 19181bd /khanify display bugs pick aca26af F$#*&%*!!! pick 575c779 I am dumb # Rebase a3464a3..33854e7 onto a3464a3 ( 2 TODO item(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 # # These lines can be re-ordered; they are executed from top to bottom. # # If you remove a line here THAT COMMIT WILL BE LOST. # # However, if you remove everything, the rebase will be aborted.
  101. pick 98e64d6 Fix display bug Fixes #145 f 23c925b Actually

    Fix display bug Fixes r cac9ec3 Update comparison text pick d210f51 I hate display bugs pick ada9e45 Better markup for container pick 19181bd /khanify display bugs pick aca26af F$#*&%*!!! pick 575c779 I am dumb # Rebase a3464a3..33854e7 onto a3464a3 ( 2 TODO item(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 # # These lines can be re-ordered; they are executed from top to bottom. # # If you remove a line here THAT COMMIT WILL BE LOST. # # However, if you remove everything, the rebase will be aborted.
  102. pick 98e64d6 Fix display bug Fixes #145 f 23c925b Actually

    Fix display bug Fixes f d210f51 I hate display bugs r cac9ec3 Update comparison text pick ada9e45 Better markup for container pick 19181bd /khanify display bugs pick aca26af F$#*&%*!!! pick 575c779 I am dumb # Rebase a3464a3..33854e7 onto a3464a3 ( 2 TODO item(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 # # These lines can be re-ordered; they are executed from top to bottom. # # If you remove a line here THAT COMMIT WILL BE LOST. # # However, if you remove everything, the rebase will be aborted.
  103. pick 98e64d6 Fix display bug Fixes #145 f 23c925b Actually

    Fix display bug Fixes f d210f51 I hate display bugs r cac9ec3 Update comparison text pick ada9e45 Better markup for container pick 19181bd /khanify display bugs pick aca26af F$#*&%*!!! pick 575c779 I am dumb # Rebase a3464a3..33854e7 onto a3464a3 ( 2 TODO item(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 # # These lines can be re-ordered; they are executed from top to bottom. # # If you remove a line here THAT COMMIT WILL BE LOST. # # However, if you remove everything, the rebase will be aborted.
  104. pick 98e64d6 Fix display bug Fixes #145 f 23c925b Actually

    Fix display bug Fixes f d210f51 I hate display bugs r cac9ec3 Update comparison text r ada9e45 Better markup for container pick 19181bd /khanify display bugs pick aca26af F$#*&%*!!! pick 575c779 I am dumb # Rebase a3464a3..33854e7 onto a3464a3 ( 2 TODO item(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 # # These lines can be re-ordered; they are executed from top to bottom. # # If you remove a line here THAT COMMIT WILL BE LOST. # # However, if you remove everything, the rebase will be aborted.
  105. pick 98e64d6 Fix display bug Fixes #145 f 23c925b Actually

    Fix display bug Fixes f d210f51 I hate display bugs r cac9ec3 Update comparison text r ada9e45 Better markup for container pick 19181bd /khanify display bugs pick aca26af F$#*&%*!!! pick 575c779 I am dumb # Rebase a3464a3..33854e7 onto a3464a3 ( 2 TODO item(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 # # These lines can be re-ordered; they are executed from top to bottom. # # If you remove a line here THAT COMMIT WILL BE LOST. # # However, if you remove everything, the rebase will be aborted.
  106. pick 98e64d6 Fix display bug Fixes #145 f 23c925b Actually

    Fix display bug Fixes f d210f51 I hate display bugs f 19181bd /khanify display bugs f aca26af F$#*&%*!!! f 575c779 I am dumb r cac9ec3 Update comparison text r ada9e45 Better markup for container # Rebase a3464a3..33854e7 onto a3464a3 ( 2 TODO item(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 # # These lines can be re-ordered; they are executed from top to bottom. # # If you remove a line here THAT COMMIT WILL BE LOST. # # However, if you remove everything, the rebase will be aborted.
  107. Update comparison text # Please enter the commit message for

    your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # Date: Fri Jun 19 21:41:43 2015 -0400 # # rebase in progress; onto e327139 # You are currently editing a commit while rebasing branch 'master' on 'e327139'. # # Changes to be committed: # modified: index.html #
  108. Update comparison text Fixes #174 # Please enter the commit

    message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # Date: Fri Jun 19 21:41:43 2015 -0400 # # rebase in progress; onto e327139 # You are currently editing a commit while rebasing branch 'master' on 'e327139'. # # Changes to be committed: # modified: index.html #
  109. Better markup for container # Please enter the commit message

    for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # Date: Fri Jun 19 21:41:43 2015 -0400 # # rebase in progress; onto e327139 # You are currently editing a commit while rebasing branch 'master' on '83833f1'. # # Changes to be committed: # modified: index.html # modified: styles/stylesheet.css #
  110. Better markup for container Fixes #166 # Please enter the

    commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # Date: Fri Jun 19 21:41:43 2015 -0400 # # rebase in progress; onto e327139 # You are currently editing a commit while rebasing branch 'master' on '83833f1'. # # Changes to be committed: # modified: index.html # modified: styles/stylesheet.css #
  111. $ git log e327139 Fix display bug Fixes #145 83833f1

    Update comparison text Fixes #174 7e03c29 Better markup for container Fixes #166
  112. Blame Spelunk who and why

  113. WTF?

  114. $ git blame lib/index.js

  115. None
  116. None
  117. $ git show a8fd0459

  118. None
  119. None
  120. OMG!

  121. None
  122. None
  123. TEH PR!

  124. None
  125. Trees Snapshots of directories in time

  126. Reset Modify HEAD, index, and working directory

  127. Stash Save work for later

  128. Reflog History of history

  129. Interactive Rebase Make yourself seem super organized

  130. Blame Find who and, hopefully, why

  131. Questions?

  132. Thank you! Git Better A talk by orderedlist