Your SlideShare is downloading. ×
Git 101 tutorial presentation
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Git 101 tutorial presentation

2,291
views

Published on

Published in: Technology

0 Comments
8 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,291
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
97
Comments
0
Likes
8
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Git 101 Scott Chacon
  • 2. Introduction
  • 3. Me
  • 4. Scott Chacon
  • 5. git-scm.com
  • 6. http://gitref.org
  • 7. http://progit.org
  • 8. schacon@gmail.com
  • 9. @chacon twitter
  • 10. </me>
  • 11. What is Git?
  • 12. “distributed version control system”
  • 13. what is version control?
  • 14. what is version control? what do we use it for?
  • 15. imagine a world with no version control tools
  • 16. what would you do?
  • 17. downsides?
  • 18. who doesn’t use version control?
  • 19. who doesn’t use version control? rhetorical question
  • 20. what project is this? • thousands of developers • working all across the world • used on millions of computers • runs 90% of the supercomputers in the world • runs my phone •11 years with no version control system • has an adorable mascot
  • 21. 1991-2002
  • 22. no version control
  • 23. how did they do it?
  • 24. main dude main.c library.c library.h
  • 25. main dude main.c library.c library.h ver-1.0.zip
  • 26. main dude main.c library.c library.h ver-1.0.zip you
  • 27. main dude main.c library.c library.h ver-1.0.zip you
  • 28. main dude main.c library.c library.h ver-1.0.zip you v1/main.c v1/library.c v1/library.h
  • 29. main dude main.c library.c library.h ver-1.0.zip you v1/main.c v1/library.c v1/library.h cp -Rf v1 patch
  • 30. main dude main.c library.c library.h ver-1.0.zip you v1/main.c v1/library.c v1/library.h cp -Rf v1 patch patch/main.c patch/library.c patch/library.h
  • 31. main dude main.c library.c library.h ver-1.0.zip you v1/main.c v1/library.c v1/library.h cp -Rf v1 patch patch/main.c patch/library.c patch/library.h
  • 32. main dude main.c library.c library.h ver-1.0.zip you v1/main.c v1/library.c v1/library.h cp -Rf v1 patch patch/main.c patch/library.c* patch/library.h diff -u v1 patch
  • 33. main dude main.c library.c library.h ver-1.0.zip you v1/main.c v1/library.c v1/library.h cp -Rf v1 patch patch/main.c patch/library.c* patch/library.h diff -u v1 patch $ git diff v1 patch diff --git a/v1/library.c b/patch/library.c index 0be4b5f..0120580 100644 --- a/v1/library.c +++ b/patch/library.c @@ -19,7 +19,7 @@ static struct { { "detachedhead", &advice_detached_head }, }; -int git_default_config(const char *var, const char *value) +int YO_MOMMA_IS_FAT(const char *var, const char *value) { const char *k = skip_prefix(var, "advice."); int i;
  • 34. main dude main.c library.c library.h ver-1.0.zip you v1/main.c v1/library.c v1/library.h cp -Rf v1 patch patch/main.c patch/library.c* patch/library.h diff -u v1 patch email
  • 35. main dude main.c library.c library.h you v1/main.c v1/library.c v1/library.h cp -Rf v1 patch patch/main.c patch/library.c* patch/library.h diff -u v1 patch ver-1.0.zip ver-1.1.zip
  • 36. ver-1.0.zip ver-1.1.zip ver-1.2.zip
  • 37. now imagine...
  • 38. main dude main.c library.c library.h V1
  • 39. main dude main.c library.c library.h you V1 main.c library.c library.h V1
  • 40. main dude main.c library.c library.h you V1 main.c library.c library.h V1 main.c library.c* library.h V2
  • 41. main dude main.c library.c library.h you V1 main.c* library.c library.h V3 main.c library.c library.h V1 main.c library.c* library.h V2
  • 42. main dude main.c library.c library.h you V1 main.c* library.c library.h V3 main.c library.c library.h V1 main.c library.c* library.h V2 main.c library.c* library.h V2
  • 43. main dude main.c library.c library.h you V1 main.c* library.c library.h V3 main.c library.c library.h V1 main.c library.c* library.h V2 main.c library.c* library.h V2 main.c* library.c* library.h V4
  • 44. main dude main.c library.c library.h you V1 main.c* library.c library.h V3 main.c library.c library.h V1 main.c library.c* library.h V2 main.c library.c* library.h V2 main.c* library.c* library.h V4
  • 45. main dude main.c library.c library.h you V1 main.c* library.c library.h V3 main.c library.c library.h V1 main.c library.c* library.h V2 main.c library.c* library.h V2 main.c* library.c* library.h V4
  • 46. main dude main.c library.c library.h you V1 main.c* library.c library.h V3 main.c library.c library.h V1 main.c library.c* library.h V2 main.c library.c* library.h V2 main.c* library.c* library.h V4
  • 47. Snapshots, not Patches
  • 48. delta storage                                    snapshot storage
  • 49. delta storage                                    snapshot storage
  • 50. delta storage                                    snapshot storage
  • 51. delta storage                                    snapshot storage
  • 52. delta storage                                    snapshot storage
  • 53. delta storage                                    snapshot storage
  • 54. delta storage                                    snapshot storage
  • 55. delta storage                                    snapshot storage
  • 56. delta storage                                    snapshot storage
  • 57. delta storage                                    snapshot storage
  • 58. delta storage                                    snapshot storage
  • 59. delta storage                                    snapshot storage
  • 60. delta storage                                    snapshot storage
  • 61. delta storage                                    snapshot storage
  • 62. delta storage                                    snapshot storage
  • 63. Basic Git
  • 64. First Steps
  • 65. $ git config --global user.name “Scott Chacon” $ git config --global user.email “schacon@gmail.com”
  • 66. Getting a Repo
  • 67. Create One
  • 68. git init
  • 69. $ touch hello_world.rb $ git init $ git add . $ git commit -m ‘first commit’
  • 70. $ touch hello_world.rb $ git init $ git add . $ git commit -m ‘first commit’
  • 71. $ tree -a . |-- .git | |-- HEAD | |-- branches | |-- config | |-- description | |-- hooks | | |-- post-commit.sample | | |-- post-receive.sample | | |-- ... | | |-- pre-rebase.sample | | `-- update.sample | |-- info | | `-- exclude | |-- objects | | |-- info | | `-- pack | |-- refs | | |-- heads | | `-- tags | `-- remotes `-- hello_world.rb 11 directories, 25 files
  • 72. $ tree -a . |-- .git | |-- HEAD | |-- branches | |-- config | |-- description | |-- hooks | | |-- post-commit.sample | | |-- post-receive.sample | | |-- ... | | |-- pre-rebase.sample | | `-- update.sample | |-- info | | `-- exclude | |-- objects | | |-- info | | `-- pack | |-- refs | | |-- heads | | `-- tags | `-- remotes `-- hello_world.rb 11 directories, 25 files
  • 73. $ tree -a . |-- .git | |-- HEAD | |-- branches | |-- config | |-- description | |-- hooks | | |-- post-commit.sample | | |-- post-receive.sample | | |-- ... | | |-- pre-rebase.sample | | `-- update.sample | |-- info | | `-- exclude | |-- objects | | |-- info | | `-- pack | |-- refs | | |-- heads | | `-- tags | `-- remotes `-- hello_world.rb 11 directories, 25 files
  • 74. $ touch hello_world.rb $ git init $ git add . $ git commit -m ‘first commit’
  • 75. $ touch hello_world.rb $ git init $ git add . $ git commit -m ‘first commit’
  • 76. $ tree -a . |-- .git | |-- COMMIT_EDITMSG | |-- HEAD | |-- branches | |-- config | |-- description | |-- hooks | | |-- applypatch-msg.sample | | `-- update.sample | |-- index | |-- info | | `-- exclude | |-- logs | | |-- HEAD | | `-- refs | | `-- heads | | `-- master | |-- objects | | |-- 32/09658ac8d80bc9726d3a33d77e3dfc5fe6035e | | |-- 53/9cd7886a627841d525a78d45cbc6396be20b41 | | |-- e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 | | |-- info | | `-- pack | |-- refs | | |-- heads | | | `-- master | | `-- tags | `-- remotes `-- hello_world.rb 17 directories, 33 files
  • 77. $ tree -a . |-- .git | |-- COMMIT_EDITMSG | |-- HEAD | |-- branches | |-- config | |-- description | |-- hooks | | |-- applypatch-msg.sample | | `-- update.sample | |-- index | |-- info | | `-- exclude | |-- logs | | |-- HEAD | | `-- refs | | `-- heads | | `-- master | |-- objects | | |-- 32/09658ac8d80bc9726d3a33d77e3dfc5fe6035e | | |-- 53/9cd7886a627841d525a78d45cbc6396be20b41 | | |-- e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 | | |-- info | | `-- pack | |-- refs | | |-- heads | | | `-- master | | `-- tags | `-- remotes `-- hello_world.rb 17 directories, 33 files
  • 78. $ tree -a . |-- .git | |-- COMMIT_EDITMSG | |-- HEAD | |-- branches | |-- config | |-- description | |-- hooks | | |-- applypatch-msg.sample | | `-- update.sample | |-- index | |-- info | | `-- exclude | |-- logs | | |-- HEAD | | `-- refs | | `-- heads | | `-- master | |-- objects | | |-- 32/09658ac8d80bc9726d3a33d77e3dfc5fe6035e | | |-- 53/9cd7886a627841d525a78d45cbc6396be20b41 | | |-- e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 | | |-- info | | `-- pack | |-- refs | | |-- heads | | | `-- master | | `-- tags | `-- remotes `-- hello_world.rb 17 directories, 33 files
  • 79. Clone One
  • 80. git clone
  • 81. $ git clone git://github.com/schacon/ticgit.git Initialized empty Git repository in /private/tmp/ticgit/.git/ remote: Counting objects: 591, done. remote: Compressing objects: 100% (267/267), done. remote: Total 591 (delta 253), reused 587 (delta 252) Receiving objects: 100% (591/591), 73.05 KiB, done. Resolving deltas: 100% (253/253), done. $ cd ticgit/ $ ls LICENSE! ! Rakefile! examples! note! ! ticgit.gemspec README!! bin!! lib!! spec $
  • 82. $ git clone git://github.com/schacon/ticgit.git Initialized empty Git repository in /private/tmp/ticgit/.git/ remote: Counting objects: 591, done. remote: Compressing objects: 100% (267/267), done. remote: Total 591 (delta 253), reused 587 (delta 252) Receiving objects: 100% (591/591), 73.05 KiB, done. Resolving deltas: 100% (253/253), done. $ cd ticgit/ $ ls LICENSE! ! Rakefile! examples! note! ! ticgit.gemspec README!! bin!! lib!! spec $
  • 83. $ git clone git://github.com/schacon/ticgit.git Initialized empty Git repository in /private/tmp/ticgit/.git/ remote: Counting objects: 591, done. remote: Compressing objects: 100% (267/267), done. remote: Total 591 (delta 253), reused 587 (delta 252) Receiving objects: 100% (591/591), 73.05 KiB, done. Resolving deltas: 100% (253/253), done. $ cd ticgit/ $ ls LICENSE! ! Rakefile! examples! note! ! ticgit.gemspec README!! bin!! lib!! spec $
  • 84. $ git clone git://github.com/schacon/ticgit.git Initialized empty Git repository in /private/tmp/ticgit/.git/ remote: Counting objects: 591, done. remote: Compressing objects: 100% (267/267), done. remote: Total 591 (delta 253), reused 587 (delta 252) Receiving objects: 100% (591/591), 73.05 KiB, done. Resolving deltas: 100% (253/253), done. $ cd ticgit/ $ ls .git LICENSE! ! Rakefile! examples! note! ! ticgit.gemspec README!! bin!! lib!! spec $
  • 85. A Basic Workflow
  • 86. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes
  • 87. working directory repository index git add git commit
  • 88. working directory repository index git add git commit a working copy of your project
  • 89. working directory repository index git add git commit object database
  • 90. working directory repository index git add git commit “staging”
  • 91. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes
  • 92. $ find . ./app.yaml ./index.yaml ./main.py
  • 93. #!/usr/bin/env python import wsgiref.handlers from google.appengine.ext import webapp class MainHandler(webapp.RequestHandler): def get(self): self.response.out.write('Hello world!') def main(): application = webapp.WSGIApplication([('/', MainHandler)], debug=True) wsgiref.handlers.CGIHandler().run(application) if __name__ == '__main__': main() ~ ~ "main.py" 16L, 402C $ vim main.py
  • 94. #!/usr/bin/env python import wsgiref.handlers from google.appengine.ext import webapp # this program prints out ‘hello world’ class MainHandler(webapp.RequestHandler): def get(self): self.response.out.write('Hello world!') def main(): application = webapp.WSGIApplication([('/', MainHandler)], debug=True) wsgiref.handlers.CGIHandler().run(application) if __name__ == '__main__': main() ~ ~ "main.py" 16L, 402C $ vim main.py
  • 95. $ git status
  • 96. $ git status # On branch master # Changed but not updated: # (use "git add <file>..." to update what # # modified: main.py # no changes added to commit (use "git add" an
  • 97. $ git status # On branch master # Changed but not updated: # (use "git add <file>..." to update what # # modified: main.py # no changes added to commit (use "git add" an
  • 98. $ git status # On branch master # Changed but not updated: # (use "git add <file>..." to update what # # modified: main.py # no changes added to commit (use "git add" an
  • 99. $ git status # On branch master # Changed but not updated: # (use "git add <file>..." to update what # # modified: main.py # no changes added to commit (use "git add" an STAGED
  • 100. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes
  • 101. git add
  • 102. working directory repository index git add git commit
  • 103. working directory repository index git add git commit
  • 104. $ git add main.py $ git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>. # # modified: main.py #
  • 105. # On branch master # Changes to be committed: # (use "git reset HEAD <file>. # # modified: main.py # $ git add main.py $ git status
  • 106. # On branch master # Changes to be committed: # (use "git reset HEAD <file>. # # modified: main.py # $ git add main.py $ git status THAT ARE STAGED
  • 107. $ vim app.yaml application: chacon version: 1 runtime: python api_version: 1 handlers: - url: .* script: main.py ~ ~ ~ "app.yaml" 8L, 101C
  • 108. application: chacon version: 1 runtime: python api_version: 1 handlers: - url: .* script: main.py ~ ~ ~ "app.yaml" 8L, 101C $ vim app.yaml
  • 109. application: chacon version: 2 runtime: python api_version: 1 handlers: - url: .* script: main.py ~ ~ ~ "app.yaml" 8L, 101C $ vim app.yaml
  • 110. $ git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: main.py # # Changed but not updated: # (use "git add <file>..." to update what will be com # # modified: app.yaml #
  • 111. $ vim main.py #!/usr/bin/env python import wsgiref.handlers from google.appengine.ext import webapp # this program prints out ‘hello world’ class MainHandler(webapp.RequestHandler): def get(self): self.response.out.write('Hello world!') def main(): application = webapp.WSGIApplication([('/', MainHandler)], debug=True) wsgiref.handlers.CGIHandler().run(application) if __name__ == '__main__': main() ~ ~ "main.py" 16L, 402C
  • 112. #!/usr/bin/env python import wsgiref.handlers from google.appengine.ext import webapp # this program prints out ‘hello world’ class MainHandler(webapp.RequestHandler): def get(self): self.response.out.write('Hola world!') def main(): application = webapp.WSGIApplication([('/', MainHandler)], debug=True) wsgiref.handlers.CGIHandler().run(application) if __name__ == '__main__': main() ~ ~ "main.py" 16L, 402C $ vim main.py
  • 113. #!/usr/bin/env python import wsgiref.handlers from google.appengine.ext import webapp # this program prints out ‘hello world’ class MainHandler(webapp.RequestHandler): def get(self): self.response.out.write('Hola Mundo!') def main(): application = webapp.WSGIApplication([('/', MainHandler)], debug=True) wsgiref.handlers.CGIHandler().run(application) if __name__ == '__main__': main() ~ ~ "main.py" 16L, 402C $ vim main.py
  • 114. # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: main.py # # Changed but not updated: # (use "git add <file>..." to update what will be com # # modified: app.yaml # modified: main.py # $ git status
  • 115. # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: main.py # # Changed but not updated: # (use "git add <file>..." to update what will be com # # modified: app.yaml # modified: main.py # $ git status Staged
  • 116. # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: main.py # # Changed but not updated: # (use "git add <file>..." to update what will be com # # modified: app.yaml # modified: main.py # $ git status Unstaged
  • 117. # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: main.py # # Changed but not updated: # (use "git add <file>..." to update what will be com # # modified: app.yaml # modified: main.py # $ git status
  • 118. #!/usr/bin/env python import wsgiref.handlers from google.appengine.ext import webapp # this program prints out ‘hello world’ class MainHandler(webapp.RequestHandler): def get(self): self.response.out.write('Hola Mundo!') def main(): application = webapp.WSGIApplication ([('/' debug=True) wsgiref.handlers.CGIHandler().run (applicat if __name__ == '__main__': main() #!/usr/bin/env python import wsgiref.handlers from google.appengine.ext import webapp # this program prints out ‘hello world’ class MainHandler(webapp.RequestHandler): def get(self): self.response.out.write('Hello World!') def main(): application = webapp.WSGIApplication ([('/' debug=True) wsgiref.handlers.CGIHandler().run (applicat if __name__ == '__main__': main() Staged In Working Directory
  • 119. #!/usr/bin/env python import wsgiref.handlers from google.appengine.ext import webapp # this program prints out ‘hello world’ class MainHandler(webapp.RequestHandler): def get(self): self.response.out.write('Hola Mundo!') def main(): application = webapp.WSGIApplication ([('/' debug=True) wsgiref.handlers.CGIHandler().run (applicat if __name__ == '__main__': main() #!/usr/bin/env python import wsgiref.handlers from google.appengine.ext import webapp # this program prints out ‘hello world’ class MainHandler(webapp.RequestHandler): def get(self): self.response.out.write('Hello World!') def main(): application = webapp.WSGIApplication ([('/' debug=True) wsgiref.handlers.CGIHandler().run (applicat if __name__ == '__main__': main() Staged In Working Directory
  • 120. You have to stage a file after you edit it
  • 121. You have to stage a file after you edit it
  • 122. You have to stage a file after you edit it
  • 123. $ git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: app.yaml # modified: main.py # $ git add app.yaml main.py
  • 124. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes
  • 125. git commit
  • 126. working directory repository index git add git commit
  • 127. working directory repository index git add git commit
  • 128. $ git commit # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: app.yaml # modified: main.py # ~ ~ ~ ~ ".git/COMMIT_EDITMSG" 10L, 279C
  • 129. descriptive commit message # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: app.yaml # modified: main.py # ~ ~ ~ ~ ".git/COMMIT_EDITMSG" 10L, 279C $ git commit
  • 130. descriptive commit message # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: app.yaml # modified: main.py # ~ ~ ~ ~ ".git/COMMIT_EDITMSG" 10L, 279C $ git commit
  • 131. $ git commit Created commit 77d3001: descriptive commit message 2 files changed, 4 insertions(+), 2 deletions(-)
  • 132. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes vim / emacs / etc git add (file) repo status git commit
  • 133. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes vim / emacs / etc git add (file) repo status git commit
  • 134. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes vim / emacs / etc git add (file) repo status git commit
  • 135. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes vim / emacs / etc git add (file) git status git commit
  • 136. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes vim / emacs / etc git add (file) git status git commit
  • 137. A Basicer Workflow Edit files Stage and Commit vim / emacs / etc git commit -a
  • 138. What’s going on here?
  • 139. $ git commit Created commit 77d3001: descriptive commit message 2 files changed, 4 insertions(+), 2 deletions(-)
  • 140. $ git commit Created commit 77d3001: descriptive commit message 2 files changed, 4 insertions(+), 2 deletions(-)
  • 141. 77d3001
  • 142. 77d3001a1de6bf8f5e431972fe4d25b01e595c0b
  • 143. 77d3001a1de6bf8f5e431972fe4d25b01e595c0b
  • 144. 77d3001a1de6bf8f5e431972fe4d25b01e595c0b commit size ae668.. tree parent author committer my commit message goes here and it is really, really cool c4ec5 a149e Scott Scott
  • 145. 77d3001a1de6bf8f5e431972fe4d25b01e595c0b commit size ae668.. tree parent author committer my commit message goes here and it is really, really cool c4ec5 a149e Scott Scott tree c4ec543b0322744e55c5efc9b6c4e449d398dbff parent a149e2160b3f7573768cdc2fce24d0881f3577e1 author Scott Chacon <schacon@gmail.com> 1223402504 -0700 committer Scott Chacon <schacon@gmail.com> 1223402504 -0700 descriptive commit message
  • 146. 77d3001a1de6bf8f5e431972fe4d25b01e595c0b commit size ae668.. tree parent author committer my commit message goes here and it is really, really cool c4ec5 a149e Scott Scott
  • 147. 77d3001a1de6bf8f5e431972fe4d25b01e595c0b commit size ae668.. tree parent author committer my commit message goes here and it is really, really cool c4ec5 a149e Scott Scott app.yaml index.yaml main.py ./ c4e 03e 1d3 3d5
  • 148. commit size ae668.. tree parent author committer my commit message goes here and it is really, really cool c4ec5 a149e Scott Scott app.yaml index.yaml main.py ./ c4e 03e 1d3 3d5 commit size tree parent author committer this is the previous commit and I am very proud of it 2de54 38def Scott Scott
  • 149. commit size ae668.. tree parent author committer my commit message goes here and it is really, really cool c4ec5 a149e Scott Scott app.yaml index.yaml main.py ./ c4e 03e 1d3 3d5 commit size tree parent author committer this is the previous commit and I am very proud of it 2de54 38def Scott Scott app.yaml index.yaml main.py ./ c4e 03e 1d3 3d5
  • 150. commit size ae668.. tree parent author committer my commit message goes here and it is really, really cool c4ec5 a149e Scott Scott app.yaml index.yaml main.py ./ c4e 03e 1d3 3d5 commit size tree parent author committer this is the previous commit and I am very proud of it 2de54 38def Scott Scott commit size tree parent author committer this is the commit before that and I'm not sure why 2fe65 90ecd Scott Scott app.yaml index.yaml main.py ./ c4e 03e 1d3 3d5 app.yaml index.yaml main.py ./ c4e 03e 1d3 3d5 commit size tree parent author committer this is the commit before that and I'm not sure why 2fe65 90ecd Scott Scott app.yaml index.yaml main.py ./ c4e 03e 1d3 3d5
  • 151. commit size ae668.. tree parent author committer my commit message goes here and it is really, really cool c4ec5 a149e Scott Scott app.yaml index.yaml main.py ./ c4e 03e 1d3 3d5 commit size tree parent author committer this is the previous commit and I am very proud of it 2de54 38def Scott Scott commit size tree parent author committer this is the commit before that and I'm not sure why 2fe65 90ecd Scott Scott app.yaml index.yaml main.py ./ c4e 03e 1d3 3d5 app.yaml index.yaml main.py ./ c4e 03e 1d3 3d5 commit size tree parent author committer this is the commit before that and I'm not sure why 2fe65 90ecd Scott Scott app.yaml index.yaml main.py ./ c4e 03e 1d3 3d5 48e 77da1438d c4e 3d5 1d3 03e f46 23f 30e 67e 32a 5b1
  • 152. Repository 3d4 03e ae6 5b1 1d3 c36 f46 23f 6fe 30e 67e 32a ffe 38d 5b1 1d3 254 a14 d23 2d3 48e 735 de3 c4ec4e 77d 3d5
  • 153. Repository 3d4 03e ae6 5b1 1d3 c36 f46 23f 6fe 30e 67e 32a ffe 38d 5b1 1d3 254 a14 d23 2d3 48e 735 de3 c4ec4e 77d 3d5 git checkout ae635
  • 154. Repository 3d4 03e ae6 5b1 1d3 c36 f46 23f 6fe 30e 67e 32a ffe 38d 5b1 1d3 254 a14 d23 2d3 48e 735 de3 c4ec4e 77d 3d5 git checkout ae635
  • 155. Working DirectoryIndex Rakefile README simplegit.rb ./ lib/ ./Rakefile ./README ./lib/simplegit.rb ./ ./lib/ c36 3d4 03e 5b1 1d3 Repository 3d4 03e ae6 5b1 1d3 c36 f46 23f 6fe 30e 67e 32a ffe 38d 5b1 1d3 254 a14 d23 2d3 48e 735 de3 c4ec4e 77d 3d5
  • 156. Repository 3d4 03e ae6 5b1 1d3 c36 f46 23f 6fe 30e 67e 32a ffe 38d 5b1 1d3 254 a14 d23 2d3 48e 735 de3 c4ec4e 77d 3d5 Working DirectoryIndex Rakefile README simplegit.rb ./ lib/ ./Rakefile ./README ./lib/simplegit.rb ./ ./lib/ c36 3d4 03e 5b1 1d3
  • 157. Repository 3d4 03e ae6 5b1 1d3 c36 f46 23f 6fe 30e 67e 32a ffe 38d 5b1 1d3 254 a14 d23 2d3 48e 735 de3 c4ec4e 77d 3d5 Working DirectoryIndex Rakefile README simplegit.rb ./ lib/ ./Rakefile ./README ./lib/simplegit.rb ./ ./lib/ c36 3d4 03e 5b1 1d3
  • 158. Repository 3d4 03e ae6 5b1 1d3 c36 f46 23f 6fe 30e 67e 32a ffe 38d 5b1 1d3 254 a14 d23 2d3 48e 735 de3 c4ec4e 77d 3d5 Working DirectoryIndex Rakefile README simplegit.rb ./ lib/ ./Rakefile ./README ./lib/simplegit.rb ./ ./lib/ c36 3d4 03e 5b1 1d3
  • 159. Repository 3d4 03e ae6 5b1 1d3 c36 f46 23f 6fe 30e 67e 32a ffe 38d 5b1 1d3 254 a14 d23 2d3 48e 735 de3 c4ec4e 77d 3d5 Working DirectoryIndex Rakefile README simplegit.rb ./ lib/ ./Rakefile ./README ./lib/simplegit.rb ./ ./lib/ c36 3d4 03e 5b1 1d3 git add
  • 160. Repository 3d4 03e ae6 5b1 1d3 c36 f46 23f 6fe 30e 67e 32a ffe 38d 5b1 1d3 254 a14 d23 2d3 48e 735 de3 c4ec4e 77d 3d5 Working DirectoryIndex Rakefile README simplegit.rb ./ lib/ ./Rakefile ./README ./lib/simplegit.rb ./ ./lib/ c36 3d4 03e 5b1 1d3 git add 34f
  • 161. Repository 3d4 03e ae6 5b1 1d3 c36 f46 23f 6fe 30e 67e 32a ffe 38d 5b1 1d3 254 a14 d23 2d3 48e 735 de3 c4ec4e 77d 3d5 Working DirectoryIndex Rakefile README simplegit.rb ./ lib/ ./Rakefile ./README ./lib/simplegit.rb ./ ./lib/ c36 3d4 03e 5b1 1d3 git commit 34f a083da34f ae9
  • 162. Repository 3d4 03e ae6 5b1 1d3 c36 f46 23f 6fe 30e 67e 32a ffe 38d 5b1 1d3 254 a14 d23 2d3 48e 735 de3 c4ec4e 77d 3d5 Working DirectoryIndex Rakefile README simplegit.rb ./ lib/ ./Rakefile ./README ./lib/simplegit.rb ./ ./lib/ c36 3d4 03e 5b1 1d334f a083da34f ae9
  • 163. Repository 3d4 03e ae6 5b1 1d3 c36 f46 23f 6fe 30e 67e 32a ffe 38d 5b1 1d3 254 a14 d23 2d3 48e 735 de3 c4ec4e 77d 3d5 Working DirectoryIndex Rakefile README simplegit.rb ./ lib/ ./Rakefile ./README ./lib/simplegit.rb ./ ./lib/ c36 3d4 03e 5b1 1d334f a083da34f ae9
  • 164. object model blob commit tree C1 }directory list file contents pointer to a snapshot
  • 165. object model blob commit tree C1 }directory list file contents pointer to a snapshot
  • 166. ref commit commitcommit tree treeblob tree treeblob tree treeblob blob
  • 167. Bulk Staging
  • 168. working directory repository index
  • 169. working directory repository index git add
  • 170. working directory repository index git add git add git add
  • 171. working directory repository index git add git commit
  • 172. git add -u
  • 173. git commit -a
  • 174. working directory repository git commit -aindex
  • 175. git commit -a git add -u git commit
  • 176. Patch Staging
  • 177. git add -p
  • 178. $ git status # On branch master # Changed but not updated: # (use "git add <file>..." to update what wi # (use "git checkout -- <file>..." to discar # # modified: ticgit.gemspec # no changes added to commit (use "git add" and/
  • 179. $ git status # On branch master # Changed but not updated: # (use "git add <file>..." to update what wi # (use "git checkout -- <file>..." to discar # # modified: ticgit.gemspec # no changes added to commit (use "git add" and/
  • 180. $ git add -p diff --git a/ticgit.gemspec b/ticgit.gemspec index 9c32bd4..a44667b 100644 --- a/ticgit.gemspec +++ b/ticgit.gemspec @@ -1,7 +1,7 @@ Gem::Specification.new do |s| s.platform = Gem::Platform::RUBY s.name = "ticgit" - s.version = "0.3.5" + s.version = "0.3.6" s.date = "2008-05-10" s.author = "Scott Chacon" s.email = "schacon@gmail.com" Stage this hunk [y,n,a,d,/,j,J,g,e,?]? y
  • 181. $ git add -p diff --git a/ticgit.gemspec b/ticgit.gemspec index 9c32bd4..a44667b 100644 --- a/ticgit.gemspec +++ b/ticgit.gemspec @@ -1,7 +1,7 @@ Gem::Specification.new do |s| s.platform = Gem::Platform::RUBY s.name = "ticgit" - s.version = "0.3.5" + s.version = "0.3.6" s.date = "2008-05-10" s.author = "Scott Chacon" s.email = "schacon@gmail.com" Stage this hunk [y,n,a,d,/,j,J,g,e,?]? y
  • 182. $ git add -p diff --git a/ticgit.gemspec b/ticgit.gemspec index 9c32bd4..a44667b 100644 --- a/ticgit.gemspec +++ b/ticgit.gemspec @@ -1,7 +1,7 @@ Gem::Specification.new do |s| s.platform = Gem::Platform::RUBY s.name = "ticgit" - s.version = "0.3.5" + s.version = "0.3.6" s.date = "2008-05-10" s.author = "Scott Chacon" s.email = "schacon@gmail.com" Stage this hunk [y,n,a,d,/,j,J,g,e,?]?
  • 183. $ git add -p diff --git a/ticgit.gemspec b/ticgit.gemspec index 9c32bd4..a44667b 100644 --- a/ticgit.gemspec +++ b/ticgit.gemspec @@ -1,7 +1,7 @@ Gem::Specification.new do |s| s.platform = Gem::Platform::RUBY s.name = "ticgit" - s.version = "0.3.5" + s.version = "0.3.6" s.date = "2008-05-10" s.author = "Scott Chacon" s.email = "schacon@gmail.com" Stage this hunk [y,n,a,d,/,j,J,g,e,?]? y
  • 184. @@ -9,9 +9,10 @@ Gem::Specification.new do |s| s.files = ["lib/ticgit/base.rb", "lib/ticgit/ "lib/ticgit/comment.rb", "lib/ticgit/ticket.rb", "lib/ ticgit.rb", "bin/ti", "bin/ticgitweb"] s.bindir = 'bin' - s.executables << "ti" - s.executables << "ticgitweb" + s.executables = ["ti", "ticgitweb"] + s.default_executable = %q{ti} s.homepage = "http://github/schacon/ticgit" s.require_paths = ["lib", "bin"] + s.specification_version = 2 if s.respond_to? :specification_version= end Stage this hunk [y,n,a,d,/,K,g,s,e,?]?
  • 185. @@ -9,9 +9,10 @@ Gem::Specification.new do |s| s.files = ["lib/ticgit/base.rb", "lib/ticgit/ "lib/ticgit/comment.rb", "lib/ticgit/ticket.rb", "lib/ ticgit.rb", "bin/ti", "bin/ticgitweb"] s.bindir = 'bin' - s.executables << "ti" - s.executables << "ticgitweb" + s.executables = ["ti", "ticgitweb"] + s.default_executable = %q{ti} s.homepage = "http://github/schacon/ticgit" s.require_paths = ["lib", "bin"] + s.specification_version = 2 if s.respond_to? :specification_version= end Stage this hunk [y,n,a,d,/,K,g,s,e,?]?
  • 186. @@ -9,9 +9,10 @@ Gem::Specification.new do |s| s.files = ["lib/ticgit/base.rb", "lib/ticgit/ "lib/ticgit/comment.rb", "lib/ticgit/ticket.rb", "lib/ ticgit.rb", "bin/ti", "bin/ticgitweb"] s.bindir = 'bin' - s.executables << "ti" - s.executables << "ticgitweb" + s.executables = ["ti", "ticgitweb"] + s.default_executable = %q{ti} s.homepage = "http://github/schacon/ticgit" s.require_paths = ["lib", "bin"] + s.specification_version = 2 if s.respond_to? :specification_version= end Stage this hunk [y,n,a,d,/,K,g,s,e,?]? n
  • 187. $ git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: ticgit.gemspec # # Changed but not updated: # (use "git add <file>..." to update what will be com # (use "git checkout -- <file>..." to discard changes # # modified: ticgit.gemspec #
  • 188. $ git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: ticgit.gemspec # # Changed but not updated: # (use "git add <file>..." to update what will be com # (use "git checkout -- <file>..." to discard changes # # modified: ticgit.gemspec #
  • 189. $ git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: ticgit.gemspec # # Changed but not updated: # (use "git add <file>..." to update what will be com # (use "git checkout -- <file>..." to discard changes # # modified: ticgit.gemspec #
  • 190. $ git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: ticgit.gemspec # # Changed but not updated: # (use "git add <file>..." to update what will be com # (use "git checkout -- <file>..." to discard changes # # modified: ticgit.gemspec #
  • 191. partially stage files
  • 192. git add -p
  • 193. Changes
  • 194. delta storage                                    snapshot storage
  • 195. delta storage                                    snapshot storage
  • 196. delta storage                                    snapshot storage
  • 197. git diff
  • 198. What is not yet staged?
  • 199. git diff
  • 200. git diff working directory repository index
  • 201. What is staged?
  • 202. git diff --cached
  • 203. git diff --cached working directory repository index
  • 204. git diff --stat
  • 205. $ git diff --stat kidgloves.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
  • 206. Unified Diff
  • 207. git diff > change.patch
  • 208. git diff > change.patch patch -p1 < change.patch
  • 209. git diff > change.patch patch -p1 < change.patch git apply change.patch or
  • 210. History
  • 211. git log
  • 212. Branching and Merging
  • 213. branches
  • 214. branches lightweight, movable pointers to a commit C1 branch
  • 215. branching
  • 216. git branch
  • 217. git checkout
  • 218. C1 master C0 C2 C3 experiment HEAD default
  • 219. C1 master C0 C2 C3 experiment C3 C4 experiment C5 git branch experiment HEAD default
  • 220. C1 master C0 C2 C3 experiment C3 C4 experiment C5 git branch experiment HEAD default
  • 221. C1 master C0 C2 C3 experiment C3 C4 experiment C5 HEAD $ git branch * default experiment default
  • 222. C1 master C0 C2 C3 experiment C3 C4 experiment C5 HEAD $ git branch * default experiment default
  • 223. C1 master C0 C2 C3 experiment C3 C4 experiment C5 git checkout experiment HEAD default
  • 224. C1 master C0 C2 C3 experiment master 2 C3 C4 experiment C5 T1 git commit HEAD default
  • 225. C1 master C0 C2 C3 experiment master 2 C3 C4 experiment C5 T1 git commit HEAD default
  • 226. C1 master C0 C2 C3 experiment master 2 C3 C4 experiment C5 T1 git commit HEAD default
  • 227. C1 master C0 C2 C3 experiment C1 master C2 C3 C4 experiment C5 T1 git commit git commit HEAD default
  • 228. C1 master C0 C2 C3 experiment C1 master C2 C3 C4 experiment C5 T1 HEAD git checkout defaultdefault
  • 229. C1 master C0 C2 C3 experiment C1 master C2 C3 C4 experiment C5 T1 HEAD git checkout defaultdefault
  • 230. C1 master C0 C2 C3 C4 experiment C5 T1 C1 master C2 C3 C4 experiment C5 T1git commit HEAD default
  • 231. C1 master C0 C2 C3 C4 experiment C5 T1 C1 master C2 C3 C4 experiment C5 T1git commit HEAD default
  • 232. C1 master C0 C2 C3 C4 experiment C5 T1 C1 master C2 C3 C4 experiment C5 T1git commit HEAD default
  • 233. C1 master C0 C2 C3 C4 experiment C5 T1 git checkout experiment git commit HEAD default
  • 234. what is a branch, really?
  • 235. $ find .git/refs .git/refs .git/refs/heads .git/refs/heads/default .git/refs/heads/experiment
  • 236. $ find .git/refs .git/refs .git/refs/heads .git/refs/heads/default .git/refs/heads/experiment
  • 237. $ find .git/refs .git/refs .git/refs/heads .git/refs/heads/default .git/refs/heads/experiment
  • 238. $ find .git/refs .git/refs .git/refs/heads .git/refs/heads/default .git/refs/heads/experiment $ cat .git/refs/heads/default 6370409dc9e38af91565082bdf93577ff555489e
  • 239. $ find .git/refs .git/refs .git/refs/heads .git/refs/heads/default .git/refs/heads/experiment $ cat .git/refs/heads/default 6370409dc9e38af91565082bdf93577ff555489e $ cat .git/refs/heads/experiment 33ce13c2f0ed35775956f81191b01a644448dcfc
  • 240. $ cat .git/HEAD ref: refs/heads/experiment
  • 241. $ cat .git/HEAD ref: refs/heads/experiment
  • 242. $ cat .git/HEAD ref: refs/heads/experiment
  • 243. merging
  • 244. git merge
  • 245. C1 master C0 C2 C3 C4 experiment C5 T1 HEAD default
  • 246. C1 master C0 C2 C3 C4 experiment C5 T1 HEAD git checkout default default
  • 247. C1C0 C2 C3 C4 experiment C5 C6 masterT1 git checkout default git merge experiment HEAD default
  • 248. C1C0 C2 C3 C4 experiment C5 C6 masterT1 git checkout default git merge experiment HEAD default
  • 249. C1C0 C2 C3 C4 C5 C6 C7 C8 default experiment HEADgit checkout experiment
  • 250. C1C0 C2 C3 C4 C5 C6 C7 C8 default experiment HEADgit commit
  • 251. C1C0 C2 C3 C4 C5 C6 C7 C8 default experiment HEAD git checkout default
  • 252. C1C0 C2 C3 C4 C5 C6 C7 C8 default experiment HEAD git merge experiment
  • 253. Why is this cool?
  • 254. try out an idea
  • 255. isolate work units
  • 256. long running topics
  • 257. visualizing your branches
  • 258. git log --graph
  • 259. git log --oneline --graph
  • 260. gitk
  • 261. gitk 6d13f..41aba
  • 262. git log --all
  • 263. Deleting Branches
  • 264. git branch -d branch
  • 265. git branch -D branch
  • 266. Stashing
  • 267. when a commit is too much
  • 268. $ git status # On branch iss53 # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: src/com/android/alarmclock/AlarmAlert.java # modified: src/com/android/alarmclock/AlarmAlertWakeLock.java # no changes added to commit (use "git add" and/or "git commit -a") $ git stash Saved working directory and index state "WIP on iss53: c8208f9... Merge branch 'cupcake'" HEAD is now at c8208f9 Merge branch 'cupcake' (To restore them type "git stash apply") $ git status # On branch iss53 nothing to commit (working directory clean)
  • 269. $ git status # On branch iss53 # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: src/com/android/alarmclock/AlarmAlert.java # modified: src/com/android/alarmclock/AlarmAlertWakeLock.java # no changes added to commit (use "git add" and/or "git commit -a") $ git stash Saved working directory and index state "WIP on iss53: c8208f9... Merge branch 'cupcake'" HEAD is now at c8208f9 Merge branch 'cupcake' (To restore them type "git stash apply") $ git status # On branch iss53 nothing to commit (working directory clean)
  • 270. $ git status # On branch iss53 # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: src/com/android/alarmclock/AlarmAlert.java # modified: src/com/android/alarmclock/AlarmAlertWakeLock.java # no changes added to commit (use "git add" and/or "git commit -a") $ git stash Saved working directory and index state "WIP on iss53: c8208f9... Merge branch 'cupcake'" HEAD is now at c8208f9 Merge branch 'cupcake' (To restore them type "git stash apply") $ git status # On branch iss53 nothing to commit (working directory clean)
  • 271. $ git status # On branch iss53 # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: src/com/android/alarmclock/AlarmAlert.java # modified: src/com/android/alarmclock/AlarmAlertWakeLock.java # no changes added to commit (use "git add" and/or "git commit -a") $ git stash Saved working directory and index state "WIP on iss53: c8208f9... Merge branch 'cupcake'" HEAD is now at c8208f9 Merge branch 'cupcake' (To restore them type "git stash apply") $ git status # On branch iss53 nothing to commit (working directory clean)
  • 272. $ git status # On branch iss53 # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: src/com/android/alarmclock/AlarmAlert.java # modified: src/com/android/alarmclock/AlarmAlertWakeLock.java # no changes added to commit (use "git add" and/or "git commit -a") $ git stash Saved working directory and index state "WIP on iss53: c8208f9... Merge branch 'cupcake'" HEAD is now at c8208f9 Merge branch 'cupcake' (To restore them type "git stash apply") $ git status # On branch iss53 nothing to commit (working directory clean)
  • 273. $ git status # On branch iss53 # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: src/com/android/alarmclock/AlarmAlert.java # modified: src/com/android/alarmclock/AlarmAlertWakeLock.java # no changes added to commit (use "git add" and/or "git commit -a") $ git stash Saved working directory and index state "WIP on iss53: c8208f9... Merge branch 'cupcake'" HEAD is now at c8208f9 Merge branch 'cupcake' (To restore them type "git stash apply") $ git status # On branch iss53 nothing to commit (working directory clean)
  • 274. $ git status # On branch iss53 # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: src/com/android/alarmclock/AlarmAlert.java # modified: src/com/android/alarmclock/AlarmAlertWakeLock.java # no changes added to commit (use "git add" and/or "git commit -a") $ git stash Saved working directory and index state "WIP on iss53: c8208f9... Merge branch 'cupcake'" HEAD is now at c8208f9 Merge branch 'cupcake' (To restore them type "git stash apply") $ git status # On branch iss53 nothing to commit (working directory clean)
  • 275. $ git status # On branch iss53 # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: src/com/android/alarmclock/AlarmAlert.java # modified: src/com/android/alarmclock/AlarmAlertWakeLock.java # no changes added to commit (use "git add" and/or "git commit -a") $ git stash Saved working directory and index state "WIP on iss53: c8208f9... Merge branch 'cupcake'" HEAD is now at c8208f9 Merge branch 'cupcake' (To restore them type "git stash apply") $ git status # On branch iss53 nothing to commit (working directory clean)
  • 276. $ git status # On branch iss53 # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: src/com/android/alarmclock/AlarmAlert.java # modified: src/com/android/alarmclock/AlarmAlertWakeLock.java # no changes added to commit (use "git add" and/or "git commit -a") $ git stash Saved working directory and index state "WIP on iss53: c8208f9... Merge branch 'cupcake'" HEAD is now at c8208f9 Merge branch 'cupcake' (To restore them type "git stash apply") $ git status # On branch iss53 nothing to commit (working directory clean)
  • 277. $ git stash list stash@{0}: WIP on iss53: c8208f9... Merge branch 'cupcake' $ git stash apply # On branch iss53 # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: src/com/android/alarmclock/AlarmAlert.java # modified: src/com/android/alarmclock/AlarmAlertWakeLock.java # no changes added to commit (use "git add" and/or "git commit -a") $ git stash list stash@{0}: WIP on iss53: c8208f9... Merge branch 'cupcake' $ git stash drop stash@{0} Dropped stash@{0} (e19b0e94032d0614f450238f91953fe5e7e454a8)
  • 278. $ git stash list stash@{0}: WIP on iss53: c8208f9... Merge branch 'cupcake' $ git stash apply # On branch iss53 # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: src/com/android/alarmclock/AlarmAlert.java # modified: src/com/android/alarmclock/AlarmAlertWakeLock.java # no changes added to commit (use "git add" and/or "git commit -a") $ git stash list stash@{0}: WIP on iss53: c8208f9... Merge branch 'cupcake' $ git stash drop stash@{0} Dropped stash@{0} (e19b0e94032d0614f450238f91953fe5e7e454a8)
  • 279. $ git stash list stash@{0}: WIP on iss53: c8208f9... Merge branch 'cupcake' $ git stash apply # On branch iss53 # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: src/com/android/alarmclock/AlarmAlert.java # modified: src/com/android/alarmclock/AlarmAlertWakeLock.java # no changes added to commit (use "git add" and/or "git commit -a") $ git stash list stash@{0}: WIP on iss53: c8208f9... Merge branch 'cupcake' $ git stash drop stash@{0} Dropped stash@{0} (e19b0e94032d0614f450238f91953fe5e7e454a8)
  • 280. $ git stash list stash@{0}: WIP on iss53: c8208f9... Merge branch 'cupcake' $ git stash apply # On branch iss53 # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: src/com/android/alarmclock/AlarmAlert.java # modified: src/com/android/alarmclock/AlarmAlertWakeLock.java # no changes added to commit (use "git add" and/or "git commit -a") $ git stash list stash@{0}: WIP on iss53: c8208f9... Merge branch 'cupcake' $ git stash drop stash@{0} Dropped stash@{0} (e19b0e94032d0614f450238f91953fe5e7e454a8)
  • 281. $ git stash list stash@{0}: WIP on iss53: c8208f9... Merge branch 'cupcake' $ git stash apply # On branch iss53 # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: src/com/android/alarmclock/AlarmAlert.java # modified: src/com/android/alarmclock/AlarmAlertWakeLock.java # no changes added to commit (use "git add" and/or "git commit -a") $ git stash list stash@{0}: WIP on iss53: c8208f9... Merge branch 'cupcake' $ git stash drop stash@{0} Dropped stash@{0} (e19b0e94032d0614f450238f91953fe5e7e454a8)
  • 282. $ git stash list stash@{0}: WIP on iss53: c8208f9... Merge branch 'cupcake' $ git stash apply # On branch iss53 # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: src/com/android/alarmclock/AlarmAlert.java # modified: src/com/android/alarmclock/AlarmAlertWakeLock.java # no changes added to commit (use "git add" and/or "git commit -a") $ git stash list stash@{0}: WIP on iss53: c8208f9... Merge branch 'cupcake' $ git stash drop stash@{0} Dropped stash@{0} (e19b0e94032d0614f450238f91953fe5e7e454a8)
  • 283. $ git stash list stash@{0}: WIP on iss53: c8208f9... Merge branch 'cupcake' $ git stash apply # On branch iss53 # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: src/com/android/alarmclock/AlarmAlert.java # modified: src/com/android/alarmclock/AlarmAlertWakeLock.java # no changes added to commit (use "git add" and/or "git commit -a") $ git stash list stash@{0}: WIP on iss53: c8208f9... Merge branch 'cupcake' $ git stash drop stash@{0} Dropped stash@{0} (e19b0e94032d0614f450238f91953fe5e7e454a8)
  • 284. $ git stash list stash@{0}: WIP on iss53: c8208f9... Merge branch 'cupcake' $ git stash apply # On branch iss53 # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: src/com/android/alarmclock/AlarmAlert.java # modified: src/com/android/alarmclock/AlarmAlertWakeLock.java # no changes added to commit (use "git add" and/or "git commit -a") $ git stash list stash@{0}: WIP on iss53: c8208f9... Merge branch 'cupcake' $ git stash drop stash@{0} Dropped stash@{0} (e19b0e94032d0614f450238f91953fe5e7e454a8)
  • 285. git stash branch new_branch stash@{1}
  • 286. git stash save list drop pop apply branch
  • 287. Remotes
  • 288. sharing git
  • 289. git clone git://github.com/schacon/simplegit2.git
  • 290. distributed workflow
  • 291. distributed workflow fetch, pull and push
  • 292. fetch
  • 293. pull
  • 294. pull = fetch + merge
  • 295. push
  • 296. git push
  • 297. git push origin branchA:branchB
  • 298. a who in the what now?
  • 299. public repo local repo local repo public repo internet A B C
  • 300. public repo local repo local repo public repo git push (ssh) internet A B C A B C
  • 301. public repo local repo local repo public repo git push (ssh) git fetch (git) internet A B C A B C A B C
  • 302. public repo local repo local repo public repo git push (ssh) git fetch (git) internet A B C A B C A B C D E F git commit
  • 303. public repo local repo local repo public repo git push (ssh) git fetch (git) git push (ssh) internet A B C A B C A B C D E F A B C D E F
  • 304. public repo local repo local repo public repo git fetch (http) git push (ssh) git fetch (git) git push (ssh) internet A B C A B C A B C D E F A B C D E F D E F
  • 305. public repo local repo local repo public repo git fetch (http) git push (ssh) git fetch (git) git push (ssh) internet A B C A B C A B C D E F A B C D E F D E FD E F
  • 306. multiple remotes
  • 307. developer nick developer jessica my repo 5ec e4a 4a7ce0 master
  • 308. developer nick developer jessica my repo 5ec e4a 4a7ce0 master commit
  • 309. developer nick developer jessica my repo 5ec e4a 4a7ce0 master tree
  • 310. developer nick developer jessica my repo 5ec e4a 4a7ce0 master blobs
  • 311. schacon/ project developer nick developer jessica "public" my repo 5ec e4a 4a7ce0 master git push public public/master 5ec e4a 4a7ce0
  • 312. schacon/ project developer jessica "public" my repo 5ec e4a 4a7ce0 master git clone (url) public/master 5ec e4a 4a7ce0 5ec e4a 4a7ce0 developer nick
  • 313. schacon/ project developer jessica "public" my repo 5ec e4a 4a7ce0 master git commit public/master 5ec e4a 4a7ce0 5ec e4a 4a7ce0 developer nick c12ec524f
  • 314. schacon/ project "public" my repo 5ec e4a 4a7ce0 master public/master 5ec e4a 4a7ce0 5ec e4a 4a7ce0 developer nick c12ec524f git clone (url) 5ec e4a 4a7ce0 developer jessica
  • 315. schacon/ project "public" my repo 5ec e4a 4a7ce0 master public/master 5ec e4a 4a7ce0 5ec e4a 4a7ce0 developer nick c12ec524f 5ec e4a 4a7ce0 developer jessica 2fbdf74ea a09 git commit
  • 316. schacon/ project "public" my repo 5ec e4a 4a7ce0 master public/master 5ec e4a 4a7ce0 5ec e4a 4a7ce0 developer nick c12ec524f 5ec e4a 4a7ce0 developer jessica 2fbdf74ea a09 git push 5ec e4a 4a7ce0 nickh/ project c12ec524f 5ec e4a 4a7ce0 jessica/ project 2fbdf74ea a09
  • 317. schacon/ project "public" my repo 5ec e4a 4a7ce0 master public/master 5ec e4a 4a7ce0 5ec e4a 4a7ce0 developer nick c12ec524f 5ec e4a 4a7ce0 developer jessica 2fbdf74ea a09 git remote add nick git://github.com/nickh/project.git 5ec e4a 4a7ce0 nickh/ project c12ec524f 5ec e4a 4a7ce0 jessica/ project 2fbdf74ea a09"nick" git remote add nick git://github.com/nickh/project.git
  • 318. schacon/ project "public" my repo 5ec e4a 4a7ce0 master public/master 5ec e4a 4a7ce0 5ec e4a 4a7ce0 developer nick c12ec524f 5ec e4a 4a7ce0 developer jessica 2fbdf74ea a09 git remote add nick git://github.com/nickh/project.git 5ec e4a 4a7ce0 nickh/ project c12ec524f 5ec e4a 4a7ce0 jessica/ project 2fbdf74ea a09"nick"“nick” git remote add nick git://github.com/nickh/project.git
  • 319. schacon/ project "public" my repo 5ec e4a 4a7ce0 master public/master 5ec e4a 4a7ce0 5ec e4a 4a7ce0 developer nick c12ec524f 5ec e4a 4a7ce0 developer jessica 2fbdf74ea a09 git remote add jess git://github.com/jessica/project.git 5ec e4a 4a7ce0 nickh/ project c12ec524f 5ec e4a 4a7ce0 jessica/ project 2fbdf74ea a09"nick" "jess" git remote add jess git://github.com/jessica/project.git
  • 320. schacon/ project "public" my repo 5ec e4a 4a7ce0 master public/master 5ec e4a 4a7ce0 5ec e4a 4a7ce0 developer nick c12ec524f 5ec e4a 4a7ce0 developer jessica 2fbdf74ea a09 git remote add jess git://github.com/jessica/project.git 5ec e4a 4a7ce0 nickh/ project c12ec524f 5ec e4a 4a7ce0 jessica/ project 2fbdf74ea a09"nick" "jess" git remote add jess git://github.com/jessica/project.git “jess”
  • 321. schacon/ project "public" my repo 5ec e4a 4a7ce0 master public/master 5ec e4a 4a7ce0 5ec e4a 4a7ce0 developer nick c12ec524f 5ec e4a 4a7ce0 developer jessica 2fbdf74ea a09 git remote add jess git://github.com/jessica/project.git 5ec e4a 4a7ce0 nickh/ project c12ec524f 5ec e4a 4a7ce0 jessica/ project 2fbdf74ea a09"nick" "jess" schacon/ project "public" my repo 5ec e4a 4a7ce0 master public/master 5ec e4a 4a7ce0 git fetch nick 5ec c12 5ec e4a 4a7ce0 jessica/ project 2fbdf74ea a09"jess" c12ec524f nick/master git fetch nick
  • 322. schacon/ project "public" my repo 5ec e4a 4a7ce0 master public/master 5ec e4a 4a7ce0 5ec e4a 4a7ce0 developer nick c12ec524f 5ec e4a 4a7ce0 developer jessica 2fbdf74ea a09 git fetch nick 5ec e4a 4a7ce0 nickh/ project c12ec524f 5ec e4a 4a7ce0 jessica/ project 2fbdf74ea a09"nick" "jess" c12ec524f nick/master
  • 323. schacon/ project "public" my repo 5ec e4a 4a7ce0 master public/master 5ec e4a 4a7ce0 5ec e4a 4a7ce0 developer nick c12ec524f 5ec e4a 4a7ce0 developer jessica 2fbdf74ea a09 git remote add jess git://github.com/jessica/project.git 5ec e4a 4a7ce0 nickh/ project c12ec524f 5ec e4a 4a7ce0 jessica/ project 2fbdf74ea a09"nick" "jess" git fetch jess schacon/ project "public" my repo 5ec e4a 4a7ce0 master public/ e4a git fetch jess e4a nickh/ project c12ec524f jessic proje "nick" "jess ec524f nick/ma 2fbdf74ea a09 jess/ma c12 schacon/ project "public" my repo 5ec e4a 4a7ce0 master public/master 5ec e4a 4a7ce0 5ec e4a 4a7ce0 developer nick c12ec524f 5ec e4a 4a7ce0 developer jessica 2fbdf74ea a09 git fetch nick 5ec e4a 4a7ce0 nickh/ project c12ec524f 5ec e4a 4a7ce0 jessica/ project 2fbdf74ea a09"nick" "jess" c12ec524f nick/master
  • 324. schacon/ project "public" my repo 5ec e4a 4a7ce0 master public/master 5ec e4a 4a7ce0 5ec e4a 4a7ce0 developer nick c12ec524f 5ec e4a 4a7ce0 developer jessica 2fbdf74ea a09 git fetch jess 5ec e4a 4a7ce0 nickh/ project c12ec524f 5ec e4a 4a7ce0 jessica/ project 2fbdf74ea a09"nick" "jess" ec524f nick/master 2fbdf74ea a09 jess/master c12
  • 325. schacon/ project "public" my repo 5ec e4a 4a7ce0 master public/master 5ec e4a 4a7ce0 5ec e4a 4a7ce0 developer nick c12ec524f 5ec e4a 4a7ce0 developer jessica 2fbdf74ea a09 5ec e4a 4a7ce0 nickh/ project c12ec524f 5ec e4a 4a7ce0 jessica/ project 2fbdf74ea a09"nick" "jess" ec524f nick/master 2fbdf74ea a09 jess/master c12 b3bc63 git merge nick jessgit merge nick/master jess/master
  • 326. schacon/ project "public" my repo 5ec e4a 4a7ce0 master public/master 5ec e4a 4a7ce0 5ec e4a 4a7ce0 developer nick c12ec524f 5ec e4a 4a7ce0 developer jessica 2fbdf74ea a09 git push public 5ec e4a 4a7ce0 nickh/ project c12ec524f 5ec e4a 4a7ce0 jessica/ project 2fbdf74ea a09"nick" "jess" ec524f nick/master 2fbdf74ea a09 jess/master c12 b3bc63 e4a ec524f 2fbdf74ea a09 c12 b3bc63
  • 327. schacon/ project "public" my repo 5ec e4a 4a7ce0 master public/master 5ec e4a 4a7ce0 5ec e4a 4a7ce0 developer nick c12ec524f 5ec e4a 4a7ce0 developer jessica 2fbdf74ea a09 5ec e4a 4a7ce0 nickh/ project c12ec524f 5ec e4a 4a7ce0 jessica/ project 2fbdf74ea a09"nick" "jess" ec524f nick/master 2fbdf74ea a09 jess/master c12 b3bc63 e4a ec524f 2fbdf74ea a09 c12 b3bc63
  • 328. schacon/ project "public" my repo 5ec e4a 4a7ce0 master public/master 5ec e4a 4a7ce0 5ec e4a 4a7ce0 developer nick c12ec524f 5ec e4a 4a7ce0 developer jessica 2fbdf74ea a09 5ec e4a 4a7ce0 nickh/ project c12ec524f 5ec e4a 4a7ce0 jessica/ project 2fbdf74ea a09"nick" "jess" ec524f nick/master 2fbdf74ea a09 jess/master c12 b3bc63 e4a ec524f 2fbdf74ea a09 c12 b3bc63
  • 329. schacon/ project "public" my repo 5ec e4a 4a7ce0 master public/master 5ec e4a 4a7ce0 5ec e4a 4a7ce0 developer nick c12ec524f 5ec e4a 4a7ce0 developer jessica 2fbdf74ea a09 5ec e4a 4a7ce0 nickh/ project c12ec524f 5ec e4a 4a7ce0 jessica/ project 2fbdf74ea a09"nick" "jess" ec524f nick/master 2fbdf74ea a09 jess/master c12 b3bc63 e4a ec524f 2fbdf74ea a09 c12 b3bc63
  • 330. schacon/ project "public" my repo 5ec e4a 4a7ce0 master public/master 5ec e4a 4a7ce0 5ec e4a 4a7ce0 developer nick c12ec524f 5ec e4a 4a7ce0 developer jessica 2fbdf74ea a09 5ec e4a 4a7ce0 nickh/ project c12ec524f 5ec e4a 4a7ce0 jessica/ project 2fbdf74ea a09"nick" "jess" ec524f nick/master 2fbdf74ea a09 jess/master c12 b3bc63 e4a ec524f 2fbdf74ea a09 c12 b3bc63
  • 331. Remotes Are Branches
  • 332. C0 default scott jessica C1
  • 333. C0 default scott jessica C1 C0 scott/default default C1
  • 334. C0 default scott jessica C1 C0 scott/default default C1 git clone
  • 335. C0 default scott jessica C1 C0 scott/default default C1
  • 336. C0 default scott jessica C1 C0 scott/default default C1
  • 337. C0 default scott jessica C1 C1 C0 scott/default default C2 C3 C4
  • 338. C0 default scott jessica C1 C1 C0 scott/default default C2 C3 C4
  • 339. C0 default scott jessica C1 C1 C0 scott/default default C2 C3 C4
  • 340. C0 default scott C1 C5 C6 C7 jessica C1 C0 scott/default default C2 C3 C4
  • 341. C0 default scott C1 C5 C6 C7 jessica C1 C0 scott/default default C2 C3 C4
  • 342. C0 default scott jessica C1 C0 scott/default default C2 C3 C4 C1 C5 C6 C7 C5 C6 C7
  • 343. C0 default scott jessica C1 C0 scott/default default C2 C3 C4 C1 C5 C6 C7 C5 C6 C7 experiment C8 C9
  • 344. C0 default scott jessica C1 C0 scott/default default C2 C3 C4 C1 C5 C6 C7 C5 C6 C7 experiment C8 C9
  • 345. C0 default scott jessica C1 C0 scott/default default C2 C3 C4 C1 C5 C6 C7 C5 C6 C7 experiment C8 C9 git merge experiment git merge scott/default
  • 346. C0 default scott jessica C1 C0 scott/default default C2 C3 C4 C1 C5 C6 C7 C5 C6 C7 experiment C8 C9
  • 347. C0 default scott jessica C1 C0 scott/default default C2 C3 C4 C1 C5 C6 C7 C5 C6 C7 experiment C8 C9 a “remote” branch is simply a local pointer to the last known state of another repository
  • 348. Tagging
  • 349. lightweight tags
  • 350. Snapshot A Snapshot B Snapshot C 98ca9 34ac2 f30ab master HEAD
  • 351. git tag v1.0
  • 352. Snapshot A Snapshot B Snapshot C 98ca9 34ac2 f30ab master HEAD v1.0
  • 353. Snapshot A Snapshot B Snapshot C 98ca9 34ac2 f30ab master HEAD v1.0 Snapshot D a38d3
  • 354. annotated tags
  • 355. git tag -a v1.1 34ac2
  • 356. tag size 49e11.. object type tagger my tag message that explains this tag ae668 commit Scott tag v1.3
  • 357. Snapshot A Snapshot B Snapshot C 98ca9 34ac2 f30ab master HEAD v1.0 Snapshot D a38d3 tag data v1.1
  • 358. tagging objects
  • 359. git hash-object -w file.txt
  • 360. $ git hash-object -w ~/README.txt 35a0dd3af166e09ac378dfeb95953923e71ea45b $ git tag -a my_readme 35a0dd3af166e09ac378dfe $ git show my_readme tag my_readme Tagger: Scott Chacon <schacon@gmail.com> Date: Tue Mar 16 08:36:24 2010 -0700 my readme My README File by Scott Chacon
  • 361. $ git hash-object -w ~/README.txt 35a0dd3af166e09ac378dfeb95953923e71ea45b $ git tag -a my_readme 35a0dd3af166e09ac378dfe $ git show my_readme tag my_readme Tagger: Scott Chacon <schacon@gmail.com> Date: Tue Mar 16 08:36:24 2010 -0700 my readme My README File by Scott Chacon
  • 362. $ git hash-object -w ~/README.txt 35a0dd3af166e09ac378dfeb95953923e71ea45b $ git tag -a my_readme 35a0dd3af166e09ac378dfe $ git show my_readme tag my_readme Tagger: Scott Chacon <schacon@gmail.com> Date: Tue Mar 16 08:36:24 2010 -0700 my readme My README File by Scott Chacon
  • 363. sharing tags
  • 364. git push --tags
  • 365. Git Inspection
  • 366. Revision Selection
  • 367. Revision Selection alternate ways to refer to objects or ranges of objects
  • 368. Revision Selection full sha-1 partial sha-1 branch or tag name caret parent tilde spec blob spec relative specs ranges
  • 369. Full SHA1 6e453f523fa1da50ecb04431101112b3611c6a4d
  • 370. Partial SHA1 6e453f523fa1da50ecb04431101112b3611c6a4d 6e453f523fa1da50 6e453
  • 371. Branch, Remote or Tag Name v1.0 default m/cupcake
  • 372. Caret Parent default^2 2nd parent of ‘default’
  • 373. ce0e4 master 5ec47 2f45e 4eadf 2fbb3 18cae b3be1 a09c6 df2fa c36ae jess/master
  • 374. ce0e4 master 5ec47 2f45e 4eadf 2fbb3 18cae b3be1 a09c6 df2fa c36ae jess/master master^
  • 375. ce0e4 master 5ec47 2f45e 4eadf 2fbb3 18cae b3be1 a09c6 df2fa c36ae jess/master master^2
  • 376. Tilde Spec default~2 grandparent of ‘default’ (parent of the parent)
  • 377. ce0e4 master 5ec47 2f45e 4eadf 2fbb3 18cae b3be1 a09c6 df2fa c36ae jess/master master~2
  • 378. ce0e4 master 5ec47 2f45e 4eadf 2fbb3 18cae b3be1 a09c6 df2fa c36ae jess/master master^^^2 master~2^2
  • 379. ce0e4 master 5ec47 2f45e 4eadf 2fbb3 18cae b3be1 a09c6 df2fa c36ae jess/master master^^^2 master~2^2
  • 380. ce0e4 master 5ec47 2f45e 4eadf 2fbb3 18cae b3be1 a09c6 df2fa c36ae jess/master master^^^2 master~2^2
  • 381. Blob Spec default:path/to/file blob of that file in ‘default’ commit
  • 382. Relative Specs master@{yesterday} the commit ‘master’ was at yesterday
  • 383. Relative Specs master@{5} the 5th prior value of ‘master’ (locally)
  • 384. Ranges ce0e4..e4272 every commit reachable by e4272 that is not reachable by ce034
  • 385. Ranges [old]..[new] every commit reachable by [new] that is not reachable by [old]
  • 386. Ranges ce0e4.. everything since a commit
  • 387. ce0e4 master 5ec47 2f45e 4eadf 2fbb3 18cae b3be1 a09c6 df2fa c36ae jess/master jess/master..master
  • 388. ce0e4 master 5ec47 2f45e 4eadf 2fbb3 18cae b3be1 a09c6 df2fa c36ae jess/master jess/master..master
  • 389. jess/master..master ce0e4 master 5ec47 2f45e 4eadf 2fbb3 18cae b3be1 a09c6 df2fa c36ae jess/master
  • 390. ce0e4 master 5ec47 2f45e 4eadf 2fbb3 18cae b3be1 a09c6 df2fa c36ae jess/master jess/master..master
  • 391. ce0e4 master 5ec47 2f45e 4eadf 2fbb3 18cae b3be1 a09c6 df2fa c36ae jess/master jess/master..c36ae
  • 392. ce0e4 master 5ec47 2f45e 4eadf 2fbb3 18cae b3be1 a09c6 df2fa c36ae jess/master jess/master..c36ae
  • 393. ce0e4 master 5ec47 2f45e 4eadf 2fbb3 18cae b3be1 a09c6 df2fa c36ae jess/master jess/master..c36ae
  • 394. ce0e4 master 5ec47 2f45e 4eadf 2fbb3 18cae b3be1 a09c6 df2fa c36ae jess/master jess/master..c36ae
  • 395. Ranges ce0e4...e4272 every commit reachable by either but not commits reachable by both
  • 396. ce0e4 master 5ec47 2f45e 4eadf 2fbb3 18cae b3be1 a09c6 df2fa c36ae jess/master jess/master...c36ae
  • 397. ce0e4 master 5ec47 2f45e 4eadf 2fbb3 18cae b3be1 a09c6 df2fa c36ae jess/master jess/master...c36ae
  • 398. ce0e4 master 5ec47 2f45e 4eadf 2fbb3 18cae b3be1 a09c6 df2fa c36ae jess/master jess/master...c36ae
  • 399. ce0e4 master 5ec47 2f45e 4eadf 2fbb3 18cae b3be1 a09c6 df2fa c36ae jess/master jess/master...c36ae
  • 400. Advanced Log
  • 401. Log Subsets
  • 402. git log m/cupcake..
  • 403. C1 C0 m/cupcake default HEAD
  • 404. C1 C0 C2 C3 default C4 m/cupcake HEAD
  • 405. C1 C0 C2 C3 default C4 m/cupcake HEAD git log m/cupcake..
  • 406. C1 C0 C2 C3 default C4 m/cupcake HEAD git log m/cupcake..HEAD
  • 407. C1 C0 C2 C3 default C4 m/cupcake HEAD git log m/cupcake..HEAD
  • 408. C1 C0 C2 C3 default C4 m/cupcake HEAD git log m/cupcake..HEAD
  • 409. C1 C0 C2 C3 default C4 m/cupcake HEAD git log m/cupcake..HEAD
  • 410. commit 72d404debaa804fca82fd9cf710fbde48c7305c6 Author: Shawn O. Pearce <spearce@spearce.org> Date: Sun Oct 12 13:13:59 2008 -0700 test-lib: fix broken printf b8eecafd888d219633f4c29e8b6a90fc21a46dfd introduced usage of printf without a format string. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> commit 969c877506cf8cc760c7b251fef6c5b6850bfc19 Author: Jeff King <peff@peff.net> Date: Sun Oct 12 00:06:11 2008 -0400 git apply --directory broken for new files We carefully verify that the input to git-apply is sane, including cross-checking that the filenames we see in "+++" headers match what was provided on the command line of "diff --git". When --directory is used, however, we ended up comparing the unadorned name to one with the prepended root, causing us to complain about a mismatch. We simply need to prepend the root directory, if any, when pulling the name out of the git header. commit ff74126c03a8dfd04e7533573a5c420f2a7112ac Author: Johannes Schindelin <Johannes.Schindelin@gmx.de> Date: Fri Oct 10 13:42:12 2008 +0200 rebase -i: do not fail when there is no commit to cherry-pick
  • 411. commit 72d404debaa804fca82fd9cf710fbde48c7305c6 Author: Shawn O. Pearce <spearce@spearce.org> Date: Sun Oct 12 13:13:59 2008 -0700 test-lib: fix broken printf b8eecafd888d219633f4c29e8b6a90fc21a46dfd introduced usage of printf without a format string. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> commit 969c877506cf8cc760c7b251fef6c5b6850bfc19 Author: Jeff King <peff@peff.net> Date: Sun Oct 12 00:06:11 2008 -0400 git apply --directory broken for new files We carefully verify that the input to git-apply is sane, including cross-checking that the filenames we see in "+++" headers match what was provided on the command line of "diff --git". When --directory is used, however, we ended up comparing the unadorned name to one with the prepended root, causing us to complain about a mismatch. We simply need to prepend the root directory, if any, when pulling the name out of the git header. commit ff74126c03a8dfd04e7533573a5c420f2a7112ac Author: Johannes Schindelin <Johannes.Schindelin@gmx.de> Date: Fri Oct 10 13:42:12 2008 +0200 rebase -i: do not fail when there is no commit to cherry-pick C2 C3 C4
  • 412. git log m/cupcake.. git log m/cupcake..HEAD git log HEAD ^m/cupcake git log 35ae2 ^9fe42
  • 413. git log 3e45a ^573eb
  • 414. git log 3e45a ^573eb
  • 415. git log 08cb1 ca374 ^c0bf9
  • 416. C1 C0 C2 C6 C7 C3 C4 C8 C9 C5 m/cupcake default experiment m/cupcake git log c5 c7 ^c9
  • 417. C1 C0 C2 C6 C7 C3 C4 C8 C9 C5 m/cupcake default experiment m/cupcakem/cupcake default git log c5 c7 ^c9
  • 418. C1 C0 C2 C6 C7 C3 C4 C8 C9 C5 m/cupcake default experiment m/cupcakem/cupcake default git log c5 c7 ^c9
  • 419. C1 C0 C2 C6 C7 C3 C4 C8 C9 C5 m/cupcake default experiment m/cupcakem/cupcake git log c5 c7 ^c9
  • 420. C1 C0 C2 C6 C7 C3 C4 C8 C9 C5 m/cupcake default experiment git log c5 c7 ^c9
  • 421. which changes aren’t in experiment?
  • 422. C1 C0 C2 C6 C7 C3 C4 C8 C9 C5 m/cupcake default experiment git log m/cupcake default ^experiment
  • 423. C1 C0 C2 C6 C7 C3 C4 C8 C9 C5 m/cupcake default experiment git log m/cupcake default ^experiment
  • 424. C1 C0 C2 C6 C7 C3 C4 C8 C9 C5 m/cupcake default experiment git log m/cupcake default ^experiment
  • 425. C1 C0 C2 C6 C7 C3 C4 C8 C9 C5 m/cupcake default experiment git log m/cupcake default ^experiment
  • 426. C1 C0 C2 C6 C7 C3 C4 C8 C9 C5 m/cupcake default experiment git log m/cupcake default ^experiment
  • 427. C1 C0 C2 C6 C7 C3 C4 C8 C9 C5 m/cupcake default experiment git log m/cupcake default ^experiment
  • 428. C1 C0 C2 C6 C7 C3 C4 C8 C9 C5 m/cupcake default experiment git log m/cupcake default ^experiment
  • 429. Log Formatting
  • 430. git log -p
  • 431. git log -p
  • 432. git log --pretty
  • 433. git log --left-right
  • 434. $ git log --pretty=oneline --left-right 5f7f801...77976b <5f7f801227868c7abcce7e58dee3eff855011955 convert file browser to html >77976b24ff839c59c3b20d80cb28351ccb5e59a8 remove cruft >09b76d2966e2370a78ed37a31c2f7c23d08609c3 git-log >7000b24511618a21d40b39ee213d397e1d29497d like i said >c2a6adfcd18c0d95dbed6ea62ac9c9a912d18123 create this on deploy >6ba3609953d5c46a76ca1d0d3d83018be61454e6 i am too meta for you <3dff6074fe205e36fae219f277ef87aab097e236 Merge branch 'master' into h <1cdc8437fa6c621d96c4dfa5f6370c8fdb9cbc3d Merge branch 'master' into h <20125a6d37d5c1614ffe1de94ca064095968e7f0 delete default images
  • 435. $ git log --pretty=oneline --left-right 5f7f801...77976b <5f7f801227868c7abcce7e58dee3eff855011955 convert file browser to html >77976b24ff839c59c3b20d80cb28351ccb5e59a8 remove cruft >09b76d2966e2370a78ed37a31c2f7c23d08609c3 git-log >7000b24511618a21d40b39ee213d397e1d29497d like i said >c2a6adfcd18c0d95dbed6ea62ac9c9a912d18123 create this on deploy >6ba3609953d5c46a76ca1d0d3d83018be61454e6 i am too meta for you <3dff6074fe205e36fae219f277ef87aab097e236 Merge branch 'master' into h <1cdc8437fa6c621d96c4dfa5f6370c8fdb9cbc3d Merge branch 'master' into h <20125a6d37d5c1614ffe1de94ca064095968e7f0 delete default images
  • 436. $ git log --pretty=oneline --left-right 5f7f801...77976b <5f7f801227868c7abcce7e58dee3eff855011955 convert file browser to html >77976b24ff839c59c3b20d80cb28351ccb5e59a8 remove cruft >09b76d2966e2370a78ed37a31c2f7c23d08609c3 git-log >7000b24511618a21d40b39ee213d397e1d29497d like i said >c2a6adfcd18c0d95dbed6ea62ac9c9a912d18123 create this on deploy >6ba3609953d5c46a76ca1d0d3d83018be61454e6 i am too meta for you <3dff6074fe205e36fae219f277ef87aab097e236 Merge branch 'master' into h <1cdc8437fa6c621d96c4dfa5f6370c8fdb9cbc3d Merge branch 'master' into h <20125a6d37d5c1614ffe1de94ca064095968e7f0 delete default images
  • 437. $ git log --pretty=oneline --left-right 5f7f801...77976b <5f7f801227868c7abcce7e58dee3eff855011955 convert file browser to html >77976b24ff839c59c3b20d80cb28351ccb5e59a8 remove cruft >09b76d2966e2370a78ed37a31c2f7c23d08609c3 git-log >7000b24511618a21d40b39ee213d397e1d29497d like i said >c2a6adfcd18c0d95dbed6ea62ac9c9a912d18123 create this on deploy >6ba3609953d5c46a76ca1d0d3d83018be61454e6 i am too meta for you <3dff6074fe205e36fae219f277ef87aab097e236 Merge branch 'master' into h <1cdc8437fa6c621d96c4dfa5f6370c8fdb9cbc3d Merge branch 'master' into h <20125a6d37d5c1614ffe1de94ca064095968e7f0 delete default images
  • 438. git log --graph
  • 439. git log --pretty=oneline --graph
  • 440. gitk
  • 441. gitk 6d13f..41aba
  • 442. Merged Branches
  • 443. git branch --merged
  • 444. git branch --no-merged
  • 445. Branch Diffs
  • 446. git diff branch
  • 447. diff --git a/Rakefile b/Rakefile index eb54561..2d2c777 100644 --- a/Rakefile +++ b/Rakefile @@ -17,10 +17,6 @@ Rake::GemPackageTask.new(spec) do |pkg| pkg.need_tar = true end -task :default => "pkg/#{spec.name}-#{spec.version}.gem" do - puts "generated latest version" -end - desc "Regenerate Documentation" task :doc do |t| system('rdoc lib/ README --main README --inline-source') diff --git a/TODO b/TODO deleted file mode 100644 index bbe7708..0000000 --- a/TODO +++ /dev/null @@ -1,7 +0,0 @@ -Git Functions: -* add
  • 448. git diff --stat
  • 449. $ git diff --stat branch1 Rakefile | 4 ---- TODO | 7 ------- lib/simple_git.rb | 48 ------------------------------------------- lib/simplegit.rb | 52 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 52 insertions(+), 59 deletions(-)
  • 450. git diff --name-only
  • 451. $ git diff --name-only branch Rakefile TODO lib/simple_git.rb lib/simplegit.rb
  • 452. git diff branch
  • 453. git diff branch HEAD
  • 454. git diff branch1 branch2
  • 455. Revision Diffs
  • 456. git diff revA revB
  • 457. C1 C0 C2 C6 C7 C3 C4 C8 C9 C5 m/cupcake default experiment
  • 458. C1 C0 C2 C6 C7 C3 C4 C8 C9 C5 m/cupcake default experiment git diff c6 c4
  • 459. C1 C0 C2 C6 C7 C3 C4 C8 C9 C5 m/cupcake default experiment git diff c6 c4
  • 460. C1 C0 C2 C6 C7 C3 C4 C8 C9 C5 m/cupcake default experiment git diff c6 c4
  • 461. C1 C0 C2 C6 C7 C3 C4 C8 C9 C5 m/cupcake default experiment git diff c6 c4 this may not be what you want!
  • 462. C1 C0 C2 C6 C7 C3 C4 C8 C9 C5 m/cupcake default experiment ./file1C1
  • 463. C2 C1 C0 C2 C6 C7 C3 C4 C8 C9 C5 m/cupcake default experiment ./file1C1 ./file1 ./file2
  • 464. C2 C1 C0 C2 C6 C7 C3 C4 C8 C9 C5 m/cupcake default experiment ./file1C1 ./file1 ./file2 C3 ./file1 ./file3
  • 465. C2 C1 C0 C2 C6 C7 C3 C4 C8 C9 C5 m/cupcake default experiment ./file1C1 ./file1 ./file2 C3 ./file1 ./file3 C4 ./file1 ./file3 ./file4
  • 466. C2 C1 C0 C2 C6 C7 C3 C4 C8 C9 C5 m/cupcake default experiment ./file1C1 ./file1 ./file2 C3 ./file1 ./file3 C4 ./file1 ./file3 ./file4 C6 ./file1 ./file2 ./file6
  • 467. C2 ./file1C1 ./file1 ./file2 C3 ./file1 ./file3 C4 ./file1 ./file3 ./file4 C6 ./file1 ./file2 ./file6 git diff c6 c4 +file3 +file4
  • 468. C2 ./file1C1 ./file1 ./file2 C3 ./file1 ./file3 C4 ./file1 ./file3 ./file4 C6 ./file1 ./file2 ./file6 git diff c6 c4 +file3 +file4
  • 469. C2 ./file1C1 ./file1 ./file2 C3 ./file1 ./file3 C4 ./file1 ./file3 ./file4 C6 ./file1 ./file2 ./file6 git diff c6 c4 +file3 +file4 -file2 -file6
  • 470. C2 ./file1C1 ./file1 ./file2 C3 ./file1 ./file3 C4 ./file1 ./file3 ./file4 C6 ./file1 ./file2 ./file6 git diff c6 c4 +file3 +file4 -file2 -file6
  • 471. C2 ./file1C1 ./file1 ./file2 C3 ./file1 ./file3 C4 ./file1 ./file3 ./file4 C6 ./file1 ./file2 ./file6 git diff c6 c4 +file3 +file4 -file2 -file6
  • 472. C2 ./file1C1 ./file1 ./file2 C3 ./file1 ./file3 C4 ./file1 ./file3 ./file4 C6 ./file1 ./file2 ./file6 git diff c1 c4 +file3 +file4
  • 473. C2 ./file1 ./file1 ./file2 C3 ./file1 ./file3 C4./file1 ./file2 ./file6 git diff c6...c4 +file3 +file4 ./file1 ./file3 ./file4 C6 C1
  • 474. Undo
  • 475. Single File
  • 476. git checkout [commit] file
  • 477. $ git checkout master@{yesterday} netcfg.c
  • 478. $ git checkout v1.0 netcfg.c
  • 479. Entire Project
  • 480. git reset
  • 481. $ git status # Not currently on any branch. # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: src/com/android/launcher/Workspace.java # # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: src/com/android/launcher/LiveFolder.java #
  • 482. $ git status # Not currently on any branch. # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: src/com/android/launcher/Workspace.java # # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: src/com/android/launcher/LiveFolder.java #
  • 483. $ git status # Not currently on any branch. # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: src/com/android/launcher/Workspace.java # # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: src/com/android/launcher/LiveFolder.java #
  • 484. $ git status # Not currently on any branch. # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: src/com/android/launcher/Workspace.java # # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: src/com/android/launcher/LiveFolder.java #
  • 485. by default, reset changes the staging area
  • 486. $ git status # Not currently on any branch. # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: src/com/android/launcher/Workspace.java # # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: src/com/android/launcher/LiveFolder.java #
  • 487. $ git reset --hard
  • 488. --hard changes stage and working directory
  • 489. you’ve made commits, but want to move them to a topic branch
  • 490. $ git branch experiment $ git reset --hard origin/master $ git checkout topicname
  • 491. $ git branch experiment $ git reset --hard origin/master $ git checkout topicname
  • 492. $ git branch experiment $ git reset --hard origin/master $ git checkout experiment
  • 493. C0 HEAD C1origin/master master
  • 494. C0 HEAD C1origin/master master C2 C3
  • 495. C0 HEAD C1origin/master master C2 C3 experiment git checkout experiment
  • 496. C0 HEAD C1origin/master master C2 C3 experiment git reset --hard origin/master
  • 497. C0 HEAD C1origin/master master C2 C3 experiment C4 git commit
  • 498. Debugging
  • 499. Annotation
  • 500. git blame
  • 501. git blame ie:“what dumbass did this? oh, it was me...”
  • 502. git blame daemon.c 979e32fa (Randal L. Schwartz 2005-10-25 16:29:09 -0700 1) #include "cache.h" 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 2) #include "pkt-line.h" 77cb17e9 (Michal Ostrowski 2006-01-10 21:12:17 -0500 3) #include "exec_cmd.h" 49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 4) #include "interpolate.h" f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 5) 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 6) #include <syslog.h> 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 7) 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 8) #ifndef HOST_NAME_MAX 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 9) #define HOST_NAME_MAX 256 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 10) #endif 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 11) 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 12) #ifndef NI_MAXSERV 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 13) #define NI_MAXSERV 32 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 14) #endif 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 15) 9048fe1c (Petr Baudis 2005-09-24 16:13:01 +0200 16) static int log_syslog; f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 17) static int verbose; 1955fabf (Mark Wooding 2006-02-03 20:27:04 +0000 18) static int reuseaddr; f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 19) 960deccb (H. Peter Anvin 2005-10-19 14:27:01 -0700 20) static const char daemon_usage[] = 1b1dd23f (Stephan Beyer 2008-07-13 15:36:15 +0200 21) "git daemon [--verbose] [--syslog] [ 3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 22) " [--timeout=n] [--init-ti 3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 23) " [--strict-paths] [--base 73a7a656 (Jens Axboe 2007-07-27 14:00:29 -0700 24) " [--user-path | --user-pa 49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 25) " [--interpolated-path=pat 678dac6b (Tilman Sauerbeck 2006-08-22 19:37:41 +0200 26) " [--reuseaddr] [--detach] d9edcbd6 (Junio C Hamano 2006-09-07 01:40:04 -0700 27) " [--[enable|disable|allow dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 28) " [--inetd | [--listen=hos dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 29) " [--user=user dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 30) " [directory...]"; 4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 31) 4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 32) /* List of acceptable pathname prefi 96f1e58f (David Rientjes 2006-08-15 10:23:48 -0700 33) static char **ok_paths;
  • 503. git blame daemon.c 979e32fa (Randal L. Schwartz 2005-10-25 16:29:09 -0700 1) #include "cache.h" 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 2) #include "pkt-line.h" 77cb17e9 (Michal Ostrowski 2006-01-10 21:12:17 -0500 3) #include "exec_cmd.h" 49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 4) #include "interpolate.h" f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 5) 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 6) #include <syslog.h> 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 7) 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 8) #ifndef HOST_NAME_MAX 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 9) #define HOST_NAME_MAX 256 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 10) #endif 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 11) 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 12) #ifndef NI_MAXSERV 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 13) #define NI_MAXSERV 32 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 14) #endif 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 15) 9048fe1c (Petr Baudis 2005-09-24 16:13:01 +0200 16) static int log_syslog; f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 17) static int verbose; 1955fabf (Mark Wooding 2006-02-03 20:27:04 +0000 18) static int reuseaddr; f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 19) 960deccb (H. Peter Anvin 2005-10-19 14:27:01 -0700 20) static const char daemon_usage[] = 1b1dd23f (Stephan Beyer 2008-07-13 15:36:15 +0200 21) "git daemon [--verbose] [--syslog] [ 3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 22) " [--timeout=n] [--init-ti 3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 23) " [--strict-paths] [--base 73a7a656 (Jens Axboe 2007-07-27 14:00:29 -0700 24) " [--user-path | --user-pa 49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 25) " [--interpolated-path=pat 678dac6b (Tilman Sauerbeck 2006-08-22 19:37:41 +0200 26) " [--reuseaddr] [--detach] d9edcbd6 (Junio C Hamano 2006-09-07 01:40:04 -0700 27) " [--[enable|disable|allow dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 28) " [--inetd | [--listen=hos dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 29) " [--user=user dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 30) " [directory...]"; 4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 31) 4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 32) /* List of acceptable pathname prefi 96f1e58f (David Rientjes 2006-08-15 10:23:48 -0700 33) static char **ok_paths;
  • 504. git blame daemon.c 979e32fa (Randal L. Schwartz 2005-10-25 16:29:09 -0700 1) #include "cache.h" 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 2) #include "pkt-line.h" 77cb17e9 (Michal Ostrowski 2006-01-10 21:12:17 -0500 3) #include "exec_cmd.h" 49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 4) #include "interpolate.h" f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 5) 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 6) #include <syslog.h> 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 7) 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 8) #ifndef HOST_NAME_MAX 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 9) #define HOST_NAME_MAX 256 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 10) #endif 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 11) 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 12) #ifndef NI_MAXSERV 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 13) #define NI_MAXSERV 32 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 14) #endif 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 15) 9048fe1c (Petr Baudis 2005-09-24 16:13:01 +0200 16) static int log_syslog; f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 17) static int verbose; 1955fabf (Mark Wooding 2006-02-03 20:27:04 +0000 18) static int reuseaddr; f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 19) 960deccb (H. Peter Anvin 2005-10-19 14:27:01 -0700 20) static const char daemon_usage[] = 1b1dd23f (Stephan Beyer 2008-07-13 15:36:15 +0200 21) "git daemon [--verbose] [--syslog] [ 3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 22) " [--timeout=n] [--init-ti 3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 23) " [--strict-paths] [--base 73a7a656 (Jens Axboe 2007-07-27 14:00:29 -0700 24) " [--user-path | --user-pa 49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 25) " [--interpolated-path=pat 678dac6b (Tilman Sauerbeck 2006-08-22 19:37:41 +0200 26) " [--reuseaddr] [--detach] d9edcbd6 (Junio C Hamano 2006-09-07 01:40:04 -0700 27) " [--[enable|disable|allow dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 28) " [--inetd | [--listen=hos dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 29) " [--user=user dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 30) " [directory...]"; 4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 31) 4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 32) /* List of acceptable pathname prefi 96f1e58f (David Rientjes 2006-08-15 10:23:48 -0700 33) static char **ok_paths;
  • 505. 979e32fa (Randal L. Schwartz 2005-10-25 16:29:09 -0700 1) #include "cache.h" 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 2) #include "pkt-line.h" 77cb17e9 (Michal Ostrowski 2006-01-10 21:12:17 -0500 3) #include "exec_cmd.h" 49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 4) #include "interpolate.h" f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 5) 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 6) #include <syslog.h> 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 7) 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 8) #ifndef HOST_NAME_MAX 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 9) #define HOST_NAME_MAX 256 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 10) #endif 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 11) 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 12) #ifndef NI_MAXSERV 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 13) #define NI_MAXSERV 32 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 14) #endif 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 15) 9048fe1c (Petr Baudis 2005-09-24 16:13:01 +0200 16) static int log_syslog; f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 17) static int verbose; 1955fabf (Mark Wooding 2006-02-03 20:27:04 +0000 18) static int reuseaddr; f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 19) 960deccb (H. Peter Anvin 2005-10-19 14:27:01 -0700 20) static const char daemon_usage[] = 1b1dd23f (Stephan Beyer 2008-07-13 15:36:15 +0200 21) "git daemon [--verbose] [--syslog] [ 3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 22) " [--timeout=n] [--init-ti 3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 23) " [--strict-paths] [--base 73a7a656 (Jens Axboe 2007-07-27 14:00:29 -0700 24) " [--user-path | --user-pa 49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 25) " [--interpolated-path=pat 678dac6b (Tilman Sauerbeck 2006-08-22 19:37:41 +0200 26) " [--reuseaddr] [--detach] d9edcbd6 (Junio C Hamano 2006-09-07 01:40:04 -0700 27) " [--[enable|disable|allow dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 28) " [--inetd | [--listen=hos dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 29) " [--user=user dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 30) " [directory...]"; 4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 31) 4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 32) /* List of acceptable pathname prefi 96f1e58f (David Rientjes 2006-08-15 10:23:48 -0700 33) static char **ok_paths; git blame daemon.c
  • 506. 979e32fa (Randal L. Schwartz 2005-10-25 16:29:09 -0700 1) #include "cache.h" 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 2) #include "pkt-line.h" 77cb17e9 (Michal Ostrowski 2006-01-10 21:12:17 -0500 3) #include "exec_cmd.h" 49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 4) #include "interpolate.h" f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 5) 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 6) #include <syslog.h> 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 7) 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 8) #ifndef HOST_NAME_MAX 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 9) #define HOST_NAME_MAX 256 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 10) #endif 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 11) 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 12) #ifndef NI_MAXSERV 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 13) #define NI_MAXSERV 32 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 14) #endif 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 15) 9048fe1c (Petr Baudis 2005-09-24 16:13:01 +0200 16) static int log_syslog; f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 17) static int verbose; 1955fabf (Mark Wooding 2006-02-03 20:27:04 +0000 18) static int reuseaddr; f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 19) 960deccb (H. Peter Anvin 2005-10-19 14:27:01 -0700 20) static const char daemon_usage[] = 1b1dd23f (Stephan Beyer 2008-07-13 15:36:15 +0200 21) "git daemon [--verbose] [--syslog] [ 3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 22) " [--timeout=n] [--init-ti 3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 23) " [--strict-paths] [--base 73a7a656 (Jens Axboe 2007-07-27 14:00:29 -0700 24) " [--user-path | --user-pa 49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 25) " [--interpolated-path=pat 678dac6b (Tilman Sauerbeck 2006-08-22 19:37:41 +0200 26) " [--reuseaddr] [--detach] d9edcbd6 (Junio C Hamano 2006-09-07 01:40:04 -0700 27) " [--[enable|disable|allow dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 28) " [--inetd | [--listen=hos dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 29) " [--user=user dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 30) " [directory...]"; 4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 31) 4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 32) /* List of acceptable pathname prefi 96f1e58f (David Rientjes 2006-08-15 10:23:48 -0700 33) static char **ok_paths; git blame daemon.c
  • 507. 979e32fa (Randal L. Schwartz 2005-10-25 16:29:09 -0700 1) #include "cache.h" 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 2) #include "pkt-line.h" 77cb17e9 (Michal Ostrowski 2006-01-10 21:12:17 -0500 3) #include "exec_cmd.h" 49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 4) #include "interpolate.h" f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 5) 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 6) #include <syslog.h> 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 7) 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 8) #ifndef HOST_NAME_MAX 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 9) #define HOST_NAME_MAX 256 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 10) #endif 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 11) 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 12) #ifndef NI_MAXSERV 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 13) #define NI_MAXSERV 32 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 14) #endif 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 15) 9048fe1c (Petr Baudis 2005-09-24 16:13:01 +0200 16) static int log_syslog; f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 17) static int verbose; 1955fabf (Mark Wooding 2006-02-03 20:27:04 +0000 18) static int reuseaddr; f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 19) 960deccb (H. Peter Anvin 2005-10-19 14:27:01 -0700 20) static const char daemon_usage[] = 1b1dd23f (Stephan Beyer 2008-07-13 15:36:15 +0200 21) "git daemon [--verbose] [--syslog] [ 3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 22) " [--timeout=n] [--init-ti 3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 23) " [--strict-paths] [--base 73a7a656 (Jens Axboe 2007-07-27 14:00:29 -0700 24) " [--user-path | --user-pa 49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 25) " [--interpolated-path=pat 678dac6b (Tilman Sauerbeck 2006-08-22 19:37:41 +0200 26) " [--reuseaddr] [--detach] d9edcbd6 (Junio C Hamano 2006-09-07 01:40:04 -0700 27) " [--[enable|disable|allow dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 28) " [--inetd | [--listen=hos dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 29) " [--user=user dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 30) " [directory...]"; 4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 31) 4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 32) /* List of acceptable pathname prefi 96f1e58f (David Rientjes 2006-08-15 10:23:48 -0700 33) static char **ok_paths; git blame daemon.c
  • 508. git blame -C GITPackUpload.m
  • 509. git blame -C GITPackUpload.m f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 12) f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 13) #define PACK_SIGN f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 14) #define PACK_VERS f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 15) ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 16) @implementation G ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 17) ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 18) @synthesize gitRe ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 19) @synthesize needR ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 20) @synthesize gitSo ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 21) @synthesize refDi ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 22) a2cbabf5 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-25 22:29:39 +0100 23) - (id) initWithGi ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 24) { a2cbabf5 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-25 22:29:39 +0100 25) gitRepo = ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 26) needRefs = ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 27) gitSocket ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 28) return sel ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 29) } ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 30) ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 31) - (bool) uploadPa f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 32) { f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 33) NSLog(@"up f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 34) NSString * f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 35) NSArray *t f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 36) 56ef2caf Source/Network/GITServerHandler.m (Scott Chacon 2009-01-05 21:44:26 -0800 37) refDict = f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 38)
  • 510. f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 12) f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 13) #define PACK_SIGN f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 14) #define PACK_VERS f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 15) ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 16) @implementation G ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 17) ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 18) @synthesize gitRe ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 19) @synthesize needR ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 20) @synthesize gitSo ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 21) @synthesize refDi ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 22) a2cbabf5 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-25 22:29:39 +0100 23) - (id) initWithGi ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 24) { a2cbabf5 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-25 22:29:39 +0100 25) gitRepo = ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 26) needRefs = ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 27) gitSocket ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 28) return sel ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 29) } ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 30) ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 31) - (bool) uploadPa f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 32) { f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 33) NSLog(@"up f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 34) NSString * f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 35) NSArray *t f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 36) 56ef2caf Source/Network/GITServerHandler.m (Scott Chacon 2009-01-05 21:44:26 -0800 37) refDict = f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 38) git blame -C GITPackUpload.m
  • 511. f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 12) f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 13) #define PACK_SIGN f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 14) #define PACK_VERS f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 15) ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 16) @implementation G ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 17) ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 18) @synthesize gitRe ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 19) @synthesize needR ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 20) @synthesize gitSo ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 21) @synthesize refDi ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 22) a2cbabf5 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-25 22:29:39 +0100 23) - (id) initWithGi ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 24) { a2cbabf5 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-25 22:29:39 +0100 25) gitRepo = ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 26) needRefs = ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 27) gitSocket ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 28) return sel ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 29) } ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 30) ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 31) - (bool) uploadPa f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 32) { f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 33) NSLog(@"up f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 34) NSString * f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 35) NSArray *t f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 36) 56ef2caf Source/Network/GITServerHandler.m (Scott Chacon 2009-01-05 21:44:26 -0800 37) refDict = f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 38) git blame -C GITPackUpload.m
  • 512. Bisecting
  • 513. binary search for where a bug was introduced
  • 514. $ git bisect start $ git bisect bad $ git bisect good 3acb4c2c6666ed6cb91cb0b983efe9d50cf8cfbe Bisecting: 6 revisions left to test after this [ecb6e1bc347ccecc5f9350d878ce677feb13d3b2] error handling on repo $ git bisect good Bisecting: 3 revisions left to test after this [b047b02ea83310a70fd603dc8cd7a6cd13d15c04] secure this thing $ git bisect bad Bisecting: 1 revisions left to test after this [f71ce38690acf49c1f3c9bea38e09d82a5ce6014] drop exceptions table and $ git bisect good b047b02ea83310a70fd603dc8cd7a6cd13d15c04 is first bad commit commit b047b02ea83310a70fd603dc8cd7a6cd13d15c04 Author: PJ Hyett <pjhyett@gmail.com> Date: Tue Jan 27 14:48:32 2009 -0800 secure this thing :040000 040000 40ee3e7821b895e52c1695092db9bdc4c61d1730 f24d3c6ebcfc639b1a3814550e62d60b8e68a8e4 M config
  • 515. $ git bisect start $ git bisect bad $ git bisect good 3acb4c2c6666ed6cb91cb0b983efe9d50cf8cfbe Bisecting: 6 revisions left to test after this [ecb6e1bc347ccecc5f9350d878ce677feb13d3b2] error handling on repo $ git bisect good Bisecting: 3 revisions left to test after this [b047b02ea83310a70fd603dc8cd7a6cd13d15c04] secure this thing $ git bisect bad Bisecting: 1 revisions left to test after this [f71ce38690acf49c1f3c9bea38e09d82a5ce6014] drop exceptions table and $ git bisect good b047b02ea83310a70fd603dc8cd7a6cd13d15c04 is first bad commit commit b047b02ea83310a70fd603dc8cd7a6cd13d15c04 Author: PJ Hyett <pjhyett@gmail.com> Date: Tue Jan 27 14:48:32 2009 -0800 secure this thing :040000 040000 40ee3e7821b895e52c1695092db9bdc4c61d1730 f24d3c6ebcfc639b1a3814550e62d60b8e68a8e4 M config
  • 516. $ git bisect start $ git bisect bad $ git bisect good 3acb4c2c6666ed6cb91cb0b983efe9d50cf8cfbe Bisecting: 6 revisions left to test after this [ecb6e1bc347ccecc5f9350d878ce677feb13d3b2] error handling on repo $ git bisect good Bisecting: 3 revisions left to test after this [b047b02ea83310a70fd603dc8cd7a6cd13d15c04] secure this thing $ git bisect bad Bisecting: 1 revisions left to test after this [f71ce38690acf49c1f3c9bea38e09d82a5ce6014] drop exceptions table and $ git bisect good b047b02ea83310a70fd603dc8cd7a6cd13d15c04 is first bad commit commit b047b02ea83310a70fd603dc8cd7a6cd13d15c04 Author: PJ Hyett <pjhyett@gmail.com> Date: Tue Jan 27 14:48:32 2009 -0800 secure this thing :040000 040000 40ee3e7821b895e52c1695092db9bdc4c61d1730 f24d3c6ebcfc639b1a3814550e62d60b8e68a8e4 M config
  • 517. $ git bisect start $ git bisect bad $ git bisect good 3acb4c2c6666ed6cb91cb0b983efe9d50cf8cfbe Bisecting: 6 revisions left to test after this [ecb6e1bc347ccecc5f9350d878ce677feb13d3b2] error handling on repo $ git bisect good Bisecting: 3 revisions left to test after this [b047b02ea83310a70fd603dc8cd7a6cd13d15c04] secure this thing $ git bisect bad Bisecting: 1 revisions left to test after this [f71ce38690acf49c1f3c9bea38e09d82a5ce6014] drop exceptions table and $ git bisect good b047b02ea83310a70fd603dc8cd7a6cd13d15c04 is first bad commit commit b047b02ea83310a70fd603dc8cd7a6cd13d15c04 Author: PJ Hyett <pjhyett@gmail.com> Date: Tue Jan 27 14:48:32 2009 -0800 secure this thing :040000 040000 40ee3e7821b895e52c1695092db9bdc4c61d1730 f24d3c6ebcfc639b1a3814550e62d60b8e68a8e4 M config
  • 518. $ git bisect start $ git bisect bad $ git bisect good 3acb4c2c6666ed6cb91cb0b983efe9d50cf8cfbe Bisecting: 6 revisions left to test after this [ecb6e1bc347ccecc5f9350d878ce677feb13d3b2] error handling on repo $ git bisect good Bisecting: 3 revisions left to test after this [b047b02ea83310a70fd603dc8cd7a6cd13d15c04] secure this thing $ git bisect bad Bisecting: 1 revisions left to test after this [f71ce38690acf49c1f3c9bea38e09d82a5ce6014] drop exceptions table and $ git bisect good b047b02ea83310a70fd603dc8cd7a6cd13d15c04 is first bad commit commit b047b02ea83310a70fd603dc8cd7a6cd13d15c04 Author: PJ Hyett <pjhyett@gmail.com> Date: Tue Jan 27 14:48:32 2009 -0800 secure this thing :040000 040000 40ee3e7821b895e52c1695092db9bdc4c61d1730 f24d3c6ebcfc639b1a3814550e62d60b8e68a8e4 M config
  • 519. $ git bisect start $ git bisect bad $ git bisect good 3acb4c2c6666ed6cb91cb0b983efe9d50cf8cfbe Bisecting: 6 revisions left to test after this [ecb6e1bc347ccecc5f9350d878ce677feb13d3b2] error handling on repo $ git bisect good Bisecting: 3 revisions left to test after this [b047b02ea83310a70fd603dc8cd7a6cd13d15c04] secure this thing $ git bisect bad Bisecting: 1 revisions left to test after this [f71ce38690acf49c1f3c9bea38e09d82a5ce6014] drop exceptions table and $ git bisect good b047b02ea83310a70fd603dc8cd7a6cd13d15c04 is first bad commit commit b047b02ea83310a70fd603dc8cd7a6cd13d15c04 Author: PJ Hyett <pjhyett@gmail.com> Date: Tue Jan 27 14:48:32 2009 -0800 secure this thing :040000 040000 40ee3e7821b895e52c1695092db9bdc4c61d1730 f24d3c6ebcfc639b1a3814550e62d60b8e68a8e4 M config
  • 520. $ git bisect start $ git bisect bad $ git bisect good 3acb4c2c6666ed6cb91cb0b983efe9d50cf8cfbe Bisecting: 6 revisions left to test after this [ecb6e1bc347ccecc5f9350d878ce677feb13d3b2] error handling on repo $ git bisect good Bisecting: 3 revisions left to test after this [b047b02ea83310a70fd603dc8cd7a6cd13d15c04] secure this thing $ git bisect bad Bisecting: 1 revisions left to test after this [f71ce38690acf49c1f3c9bea38e09d82a5ce6014] drop exceptions table and $ git bisect good b047b02ea83310a70fd603dc8cd7a6cd13d15c04 is first bad commit commit b047b02ea83310a70fd603dc8cd7a6cd13d15c04 Author: PJ Hyett <pjhyett@gmail.com> Date: Tue Jan 27 14:48:32 2009 -0800 secure this thing :040000 040000 40ee3e7821b895e52c1695092db9bdc4c61d1730 f24d3c6ebcfc639b1a3814550e62d60b8e68a8e4 M config
  • 521. $ git bisect start $ git bisect bad $ git bisect good 3acb4c2c6666ed6cb91cb0b983efe9d50cf8cfbe Bisecting: 6 revisions left to test after this [ecb6e1bc347ccecc5f9350d878ce677feb13d3b2] error handling on repo $ git bisect good Bisecting: 3 revisions left to test after this [b047b02ea83310a70fd603dc8cd7a6cd13d15c04] secure this thing $ git bisect bad Bisecting: 1 revisions left to test after this [f71ce38690acf49c1f3c9bea38e09d82a5ce6014] drop exceptions table $ git bisect good b047b02ea83310a70fd603dc8cd7a6cd13d15c04 is first bad commit commit b047b02ea83310a70fd603dc8cd7a6cd13d15c04 Author: PJ Hyett <pjhyett@gmail.com> Date: Tue Jan 27 14:48:32 2009 -0800 secure this thing :040000 040000 40ee3e7821b895e52c1695092db9bdc4c61d1730 f24d3c6ebcfc639b1a3814550e62d60b8e68a8e4 M config
  • 522. $ git bisect start $ git bisect bad $ git bisect good 3acb4c2c6666ed6cb91cb0b983efe9d50cf8cfbe Bisecting: 6 revisions left to test after this [ecb6e1bc347ccecc5f9350d878ce677feb13d3b2] error handling on repo $ git bisect good Bisecting: 3 revisions left to test after this [b047b02ea83310a70fd603dc8cd7a6cd13d15c04] secure this thing $ git bisect bad Bisecting: 1 revisions left to test after this [f71ce38690acf49c1f3c9bea38e09d82a5ce6014] drop exceptions table $ git bisect good b047b02ea83310a70fd603dc8cd7a6cd13d15c04 is first bad commit commit b047b02ea83310a70fd603dc8cd7a6cd13d15c04 Author: PJ Hyett <pjhyett@gmail.com> Date: Tue Jan 27 14:48:32 2009 -0800 secure this thing :040000 040000 40ee3e7821b895e52c1695092db9bdc4c61d1730 f24d3c6ebcfc639b1a3814550e62d60b8e68a8e4 M config
  • 523. $ git bisect start $ git bisect bad $ git bisect good 3acb4c2c6666ed6cb91cb0b983efe9d50cf8cfbe Bisecting: 6 revisions left to test after this [ecb6e1bc347ccecc5f9350d878ce677feb13d3b2] error handling on repo $ git bisect good Bisecting: 3 revisions left to test after this [b047b02ea83310a70fd603dc8cd7a6cd13d15c04] secure this thing $ git bisect bad Bisecting: 1 revisions left to test after this [f71ce38690acf49c1f3c9bea38e09d82a5ce6014] drop exceptions table $ git bisect good b047b02ea83310a70fd603dc8cd7a6cd13d15c04 is first bad commit commit b047b02ea83310a70fd603dc8cd7a6cd13d15c04 Author: PJ Hyett <pjhyett@gmail.com> Date: Tue Jan 27 14:48:32 2009 -0800 secure this thing :040000 040000 40ee3e7821b895e52c1695092db9bdc4c61d1730 f24d3c6ebcfc639b1a3814550e62d60b8e68a8e4 M config
  • 524. $ git bisect start $ git bisect bad $ git bisect good 3acb4c2c6666ed6cb91cb0b983efe9d50cf8cfbe Bisecting: 6 revisions left to test after this [ecb6e1bc347ccecc5f9350d878ce677feb13d3b2] error handling on repo $ git bisect good Bisecting: 3 revisions left to test after this [b047b02ea83310a70fd603dc8cd7a6cd13d15c04] secure this thing $ git bisect bad Bisecting: 1 revisions left to test after this [f71ce38690acf49c1f3c9bea38e09d82a5ce6014] drop exceptions table $ git bisect good b047b02ea83310a70fd603dc8cd7a6cd13d15c04 is first bad commit commit b047b02ea83310a70fd603dc8cd7a6cd13d15c04 Author: PJ Hyett <pjhyett@gmail.com> Date: Tue Jan 27 14:48:32 2009 -0800 secure this thing :040000 040000 40ee3e7821b895e52c1695092db9bdc4c61d1730 f24d3c6ebcfc639b1a3814550e62d60b8e68a8e4 M config
  • 525. $ git bisect reset
  • 526. Rebasing
  • 527. Rewriting History
  • 528. Modifying the last commit
  • 529. git commit --amend
  • 530. Rebasing
  • 531. C1 C4 C5 C2 C3 master topic
  • 532. git merge master C1 C4 C5 C2 C3 master topic C6
  • 533. C1 C4 C5 C2 C3 master topic git rebase master
  • 534. C1 C4 C5 C2 C3 master topic git rebase master
  • 535. C1 C4 C5 C2 C3 master topic git rebase master
  • 536. C1 C4 C5 C2 C3 master topic git rebase master
  • 537. C1 C4 C5 C2 C3 master topic git rebase master git diff c2 c3 > 2-3.patch
  • 538. diff --git a/test b/test index 2eadcec..bd8c6c9 100644 --- a/test +++ b/test @@ -1,2 +1,3 @@ version one version four +version fiveC1 C4 C5 C2 C3 master topic git rebase master git diff c2 c3 > 2-3.patch
  • 539. 2-3.patch C1 C4 C5 C2 C3 master topic
  • 540. 2-3.patch C1 C4 C5 C2 C3 master topic git diff c1 c2 > 1-2.patch
  • 541. 2-3.patch C1 C4 C5 C2 C3 master topic git diff c1 c2 > 1-2.patch1-2.patch
  • 542. 1-2.patch 2-3.patch C1 C4 C5 C2 C3 master topic
  • 543. 1-2.patch 2-3.patch C1 C4 C5 C2 C3 master topic git rebase master
  • 544. 2-3.patch C1 C4 C5 C2 C3 master topic git rebase master 1-2.patch
  • 545. 2-3.patch git rebase master C1 C4 C5 C2 C3 master topic C2'
  • 546. 2-3.patch git rebase master C1 C4 C5 C2 C3 master topic C2'
  • 547. git rebase master C1 C4 C5 C2 C3 master topic C2' C3'
  • 548. git rebase master C1 C4 C5 C2 C3 master topic C2' C3'
  • 549. git rebase master C1 C4 C5 C2 C3 master topic C2' C3' topic C2' C3' C1 C4 C5 master
  • 550. C1 C4 C5master topic C2' C3' git rebase master topic C2' C3' C1 C4 C5master
  • 551. Fun with Rebasing
  • 552. rebase --onto
  • 553. Transplanting Topic Branches
  • 554. C1 C2 master
  • 555. C1 C2 master C1 C2 C3 server
  • 556. C1 C2 C3 C8 C9 client C1 C2 master server
  • 557. C1 C2 server C3 C4 C8 C10 C9 client master
  • 558. C1 C2 C5 server C3 master C4 C6 C8 C10 C9 client
  • 559. move your ‘client’ branch work to your ‘master’ branch
  • 560. C1 C2 C5 server C3 master C4 C6 C8 C10 C9 client
  • 561. C1 C2 C5 server C3 master C4 C6 C8 C10 C9 client
  • 562. C1 C2 C5 server C3 master C4 C6 C8 C10 C9 client git rebase master
  • 563. C1 C2 C5 server C3 master C4 C6 C8 C10 C9 client git rebase master
  • 564. C1 C2 C5 server C3 master C4 C6 C8 C10 C9 client git rebase master
  • 565. C1 C2 C5 server C3 master C4 C6 C8 C10 C9 client git rebase master
  • 566. C1 C2 C5 server C3 master C4 C6 C8 C10 C9 client git rebase server
  • 567. C1 C2 C5 server C3 master C4 C6 C8 C10 C9 client git rebase server
  • 568. C1 C2 C5 server C3 master C4 C6 C8 C10 C9 client git rebase server
  • 569. C1 C2 C5 server C3 master C4 C6 C8 C10 C9 client git rebase server
  • 570. C1 C2 C5 server C3 master C4 C6 C8 C10 C9 client git rebase server --onto master
  • 571. C1 C2 C5 server C3 master C4 C6 C8 C10 C9 client git rebase server --onto master
  • 572. C1 C2 C5 server C3 master C4 C6 C8 C10 C9 client git rebase server --onto master
  • 573. C1 C2 C5 server C3 master C4 C6 C8 C10 C9 client git rebase server --onto master C8 C9
  • 574. C8 C9C1 C2 C5 server C3 master C4 C6 C8 C10 C9 C8' C9' client C1 C2 C5 server C3 master C4 C6 C8 C10 C9 client
  • 575. C1 C2 C5 server C3 master C4 C6 C8 C10 C9 C8' C9' client
  • 576. C1 C2 C5 server C3 master C4 C6 C8 C10 C9 C8' C9' client git checkout server git rebase master
  • 577. C1 C2 C5 server C3 master C4 C6 C8 C10 C9 C8' C9' client git checkout server git rebase client
  • 578. C1 C2 C5 server C3 master C4 C6 C8 C10 C9 C8' C9' client git checkout server git rebase client
  • 579. C1 C2 C5 server C3 master C4 C6 C8 C10 C9 C8' C9' client git checkout server git rebase client C1 C2 C5 C6 C8' C9' client C3' C4' C10'
  • 580. git checkout server git rebase client C1 C2 C5 C6 C8' C9' client C3' C4' C10'C1 C2 C5 C6 C8' C9' client server C3' C4' C10' master
  • 581. C1 C2 C5 C6 C8' C9' client server C3' C4' C10' git checkout server git rebase client master
  • 582. transplant some of a topic branch
  • 583. C1C0 C2 C3 master topic C4 C5
  • 584. C1C0 C2 C3 master topic C4 C5
  • 585. git branch newtopic C3 C1C0 C2 C3 master topic C4 C5
  • 586. git branch newtopic C3 newtopic C1C0 C2 C3 master topic C4 C5
  • 587. git branch newtopic C3 git rebase newtopic --onto master newtopic C1C0 C2 C3 master topic C4 C5
  • 588. C1C0 C2 C3 master topic C4 C5 C4' C5' git branch newtopic C3 git rebase newtopic --onto master newtopic
  • 589. Fixing a commit several back
  • 590. git rebase -i git rebase --interactive
  • 591. C1 C0 C2 C3 C4 default
  • 592. C1 C0 C2 C3 C4 default
  • 593. C1 C0 C2 C3 C4 default default~2
  • 594. C1 C0 C2 C3 C4 default default~2
  • 595. git rebase -i default~2^
  • 596. git rebase -i default~2^
  • 597. git rebase -i default~2^
  • 598. pick 969c877 git apply --directory broken for new files pick b75271d git diff <tree>{3,}: do not reverse order of args pick 72d404d test-lib: fix broken printf # Rebase f285a2d..5c283eb onto f285a2d # # Commands: # p, pick = use commit # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # # If you remove a line here THAT COMMIT WILL BE LOST. # However, if you remove everything, the rebase will be aborted. # ~ ~ ~ ~ ~ "~/projects/git/.git/rebase-merge/git-rebase-todo" 14L, 472C
  • 599. pick 969c877 git apply --directory broken for new files pick b75271d git diff <tree>{3,}: do not reverse order of args pick 72d404d test-lib: fix broken printf # Rebase f285a2d..5c283eb onto f285a2d # # Commands: # p, pick = use commit # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # # If you remove a line here THAT COMMIT WILL BE LOST. # However, if you remove everything, the rebase will be aborted. # ~ ~ ~ ~ ~ "~/projects/git/.git/rebase-merge/git-rebase-todo" 14L, 472C C2 C3 C4
  • 600. pick 969c877 git apply --directory broken for new files pick b75271d git diff <tree>{3,}: do not reverse order of args pick 72d404d test-lib: fix broken printf # Rebase f285a2d..5c283eb onto f285a2d # # Commands: # p, pick = use commit # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # # If you remove a line here THAT COMMIT WILL BE LOST. # However, if you remove everything, the rebase will be aborted. # ~ ~ ~ ~ ~ "~/projects/git/.git/rebase-merge/git-rebase-todo" 14L, 472C
  • 601. pick 969c877 git apply --directory broken for new files pick b75271d git diff <tree>{3,}: do not reverse order of args pick 72d404d test-lib: fix broken printf # Rebase f285a2d..5c283eb onto f285a2d # # Commands: # p, pick = use commit # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # # If you remove a line here THAT COMMIT WILL BE LOST. # However, if you remove everything, the rebase will be aborted. # ~ ~ ~ ~ ~ "~/projects/git/.git/rebase-merge/git-rebase-todo" 14L, 472C
  • 602. pick 969c877 git apply --directory broken for new files pick b75271d git diff <tree>{3,}: do not reverse order of args pick 72d404d test-lib: fix broken printf # Rebase f285a2d..5c283eb onto f285a2d # # Commands: # p, pick = use commit # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # # If you remove a line here THAT COMMIT WILL BE LOST. # However, if you remove everything, the rebase will be aborted. # ~ ~ ~ ~ ~ "~/projects/git/.git/rebase-merge/git-rebase-todo" 14L, 472C
  • 603. pick 969c877 git apply --directory broken for new files pick b75271d git diff <tree>{3,}: do not reverse order of args pick 72d404d test-lib: fix broken printf # Rebase f285a2d..5c283eb onto f285a2d # # Commands: # p, pick = use commit # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # # If you remove a line here THAT COMMIT WILL BE LOST. # However, if you remove everything, the rebase will be aborted. # ~ ~ ~ ~ ~ "~/projects/git/.git/rebase-merge/git-rebase-todo" 14L, 472C
  • 604. pick 969c877 git apply --directory broken for new files pick b75271d git diff <tree>{3,}: do not reverse order of args pick 72d404d test-lib: fix broken printf # Rebase f285a2d..5c283eb onto f285a2d # # Commands: # p, pick = use commit # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # # If you remove a line here THAT COMMIT WILL BE LOST. # However, if you remove everything, the rebase will be aborted. # ~ ~ ~ ~ ~ "~/projects/git/.git/rebase-merge/git-rebase-todo" 14L, 472C
  • 605. edit 969c877 git apply --directory broken for new files pick b75271d git diff <tree>{3,}: do not reverse order of args pick 72d404d test-lib: fix broken printf # Rebase f285a2d..5c283eb onto f285a2d # # Commands: # p, pick = use commit # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # # If you remove a line here THAT COMMIT WILL BE LOST. # However, if you remove everything, the rebase will be aborted. # ~ ~ ~ ~ ~ "~/projects/git/.git/rebase-merge/git-rebase-todo" 14L, 472C
  • 606. $ git rebase -i default~2^ Stopped at 969c877... git apply --directory broken for new files You can amend the commit now, with git commit --amend Once you are satisfied with your changes, run git rebase --continue $_
  • 607. $ git rebase -i default~2^ Stopped at 969c877... git apply --directory broken for new files You can amend the commit now, with git commit --amend Once you are satisfied with your changes, run git rebase --continue $_ edit files git add git commit --amend git rebase --continue
  • 608. $ git rebase -i default~2^ Stopped at 969c877... git apply --directory broken for new files You can amend the commit now, with git commit --amend Once you are satisfied with your changes, run git rebase --continue $_ edit files git add git commit --amend git rebase --continue
  • 609. $ git rebase -i default~2^ Stopped at 969c877... git apply --directory broken for new files You can amend the commit now, with git commit --amend Once you are satisfied with your changes, run git rebase --continue $_ edit files git add git commit --amend git rebase --continue
  • 610. $ git rebase -i default~2^ Stopped at 969c877... git apply --directory broken for new files You can amend the commit now, with git commit --amend Once you are satisfied with your changes, run git rebase --continue $_ edit files git add git commit --amend git rebase --continue
  • 611. C1 C0 C2 C3 C4 default C2' C3' C4'
  • 612. C1 C0 C2 C3 C4 default C2' C3' C4'
  • 613. C1 C0 C2 C3 C4 default C2' C3' C4'
  • 614. Squashing commits together
  • 615. pick 969c877 git apply --directory broken for new files pick b75271d git diff <tree>{3,}: do not reverse order of args pick 72d404d test-lib: fix broken printf # Rebase f285a2d..5c283eb onto f285a2d # # Commands: # p, pick = use commit # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # # If you remove a line here THAT COMMIT WILL BE LOST. # However, if you remove everything, the rebase will be aborted. # ~ ~ ~ ~ ~ "~/projects/git/.git/rebase-merge/git-rebase-todo" 14L, 472C
  • 616. pick 969c877 git apply --directory broken for new files squash b75271d git diff <tree>{3,}: do not reverse order of args squash 72d404d test-lib: fix broken printf # Rebase f285a2d..5c283eb onto f285a2d # # Commands: # p, pick = use commit # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # # If you remove a line here THAT COMMIT WILL BE LOST. # However, if you remove everything, the rebase will be aborted. # ~ ~ ~ ~ ~ "~/projects/git/.git/rebase-merge/git-rebase-todo" 14L, 472C
  • 617. # This is a combination of 3 commits. # The first commit's message is: git apply --directory broken for new files # This is the 2nd commit message: git diff <tree>{3,}: do not reverse order of args # This is the 3rd commit message: test-lib: fix broken printf # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # Author: Jeff King <peff@peff.net> # # Not currently on any branch. # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: builtin-apply.c # modified: builtin-diff.c # modified: t/t4013-diff-various.sh # new file: t/t4013/diff.diff_master_master^_side # modified: t/t4128-apply-root.sh # modified: t/test-lib.sh # ~ ~ ".git/COMMIT_EDITMSG" 39L, 1454C
  • 618. # This is a combination of 3 commits. # The first commit's message is: git apply --directory broken for new files # This is the 2nd commit message: git diff <tree>{3,}: do not reverse order of args # This is the 3rd commit message: test-lib: fix broken printf # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # Author: Jeff King <peff@peff.net> # # Not currently on any branch. # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: builtin-apply.c # modified: builtin-diff.c # modified: t/t4013-diff-various.sh # new file: t/t4013/diff.diff_master_master^_side # modified: t/t4128-apply-root.sh # modified: t/test-lib.sh # ~ ~ ".git/COMMIT_EDITMSG" 39L, 1454C
  • 619. # This is a combination of 3 commits. # The first commit's message is: git apply --directory broken for new files # This is the 2nd commit message: git diff <tree>{3,}: do not reverse order of args # This is the 3rd commit message: test-lib: fix broken printf # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # Author: Jeff King <peff@peff.net> # # Not currently on any branch. # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: builtin-apply.c # modified: builtin-diff.c # modified: t/t4013-diff-various.sh # new file: t/t4013/diff.diff_master_master^_side # modified: t/t4128-apply-root.sh # modified: t/test-lib.sh # ~ ~ ".git/COMMIT_EDITMSG" 39L, 1454C
  • 620. # This is a combination of 3 commits. # The first commit's message is: git apply --directory broken for new files # This is the 2nd commit message: git diff <tree>{3,}: do not reverse order of args # This is the 3rd commit message: test-lib: fix broken printf # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # Author: Jeff King <peff@peff.net> # # Not currently on any branch. # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: builtin-apply.c # modified: builtin-diff.c # modified: t/t4013-diff-various.sh # new file: t/t4013/diff.diff_master_master^_side # modified: t/t4128-apply-root.sh # modified: t/test-lib.sh # ~ ~ ".git/COMMIT_EDITMSG" 39L, 1454C
  • 621. C1 C0 C2 C3 C4 default C5
  • 622. The Perils
  • 623. C1 C0 default scott jessica
  • 624. C0 default scott jessica C1 C0 scott/default default C2 C3 C4 C1
  • 625. C0 C5 C6 C7 default scott jessica C1 C0 scott/default default C2 C3 C4 C1 C5 C6 C7
  • 626. C0 C5 C6 C7 default scott jessica C1 C0 scott/default default C2 C3 C4 C1 C5 C6 C7 C8
  • 627. C0 C5 C6 C7 default scott jessica C1 C0 scott/default default C2 C3 C4 C1 C5 C6 C7 C5' C6' C7' C8
  • 628. C0 C5 C6 C7 default scott jessica C1 C0 scott/default default C2 C3 C4 C1 C5 C6 C7 C5' C6' C7' C8 C5' C6' C7'
  • 629. C0 C5 C6 C7 default scott jessica C1 C0 scott/default default C2 C3 C4 C1 C5 C6 C7 C5' C6' C7' C8 C5' C6' C7' C9
  • 630. Filter Branch History Revision on Steroids
  • 631. remove all instances of a file from every commit
  • 632. git filter-branch --tree-filter 'rm -f filename' HEAD
  • 633. change your email in all commits
  • 634. git filter-branch --env-filter "export GIT_AUTHOR_EMAIL=you@email.com" HEAD
  • 635. git filter-branch --env-filter "export GIT_AUTHOR_EMAIL=you@email.com" origin/master..HEAD
  • 636. Cherry Picking
  • 637. git cherry-pick 3f40a
  • 638. C1 C0 C2 C6 C7 C3 C4 C8 C9C5 m/cupcake default experiment C10
  • 639. C1 C0 C2 C6 C7 C3 C4 C8 C9C5 m/cupcake default experiment C10
  • 640. C1 C0 C2 C6 C7 C3 C4 C8 C9C5 m/cupcake default experiment C10
  • 641. C1 C0 C2 C6 C7 C3 C4 C8 C9C5 m/cupcake default experiment C10
  • 642. C1 C0 C2 C6 C7 C3 C4 C8 C9C5 m/cupcake default experiment C10 git checkout default
  • 643. C1 C0 C2 C6 C7 C3 C4 C8 C9C5 m/cupcake default experiment C10 git cherry-pick c9
  • 644. C1 C0 C2 C6 C7 C3 C4 C8 C9C5 m/cupcake default experiment C10 git cherry-pick c9 git cherry-pick experiment^
  • 645. C1 C0 C2 C6 C7 C3 C4 C8 C9C5 m/cupcake default experiment C10 git cherry-pick c9
  • 646. C1 C0 C2 C6 C7 C3 C4 C8 C9C5 m/cupcake default experiment C10C9'
  • 647. C1 C0 C2 C6 C7 C3 C4 C8 C9C5 m/cupcake default experiment C10C9' git branch -d experiment
  • 648. C1 C0 C2 C6 C7 C3 C4 C8 C9C5 m/cupcake default experiment C10C9'
  • 649. Customizing
  • 650. Colors
  • 651. $ git config --global color.ui true
  • 652. Custom Merge Tool
  • 653.