wayfarer 0.4.0 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (742) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yaml +1 -1
  3. data/.rubocop.yml +10 -0
  4. data/Gemfile.lock +21 -16
  5. data/docs/cookbook/batch_routing.md +22 -0
  6. data/docs/cookbook/consent_screen.md +36 -0
  7. data/docs/cookbook/executing_javascript.md +41 -0
  8. data/docs/cookbook/navigation.md +43 -0
  9. data/docs/cookbook/querying_html.md +3 -3
  10. data/docs/cookbook/screenshots.md +2 -2
  11. data/docs/cookbook/user_agent.md +1 -1
  12. data/docs/guides/callbacks.md +122 -15
  13. data/docs/guides/configuration.md +16 -10
  14. data/docs/guides/debugging.md +17 -0
  15. data/docs/guides/error_handling.md +22 -22
  16. data/docs/guides/jobs.md +44 -18
  17. data/docs/guides/navigation.md +73 -0
  18. data/docs/guides/networking/capybara.md +71 -0
  19. data/docs/guides/networking/custom_adapters.md +100 -0
  20. data/docs/guides/{browser_automation → networking}/ferrum.md +6 -4
  21. data/docs/guides/networking/http.md +33 -0
  22. data/docs/guides/{browser_automation → networking}/selenium.md +11 -7
  23. data/docs/guides/networking.md +77 -3
  24. data/docs/guides/pages.md +4 -4
  25. data/docs/guides/performance.md +108 -0
  26. data/docs/guides/reliability.md +41 -0
  27. data/docs/guides/routing/steering.md +30 -0
  28. data/docs/guides/tasks.md +9 -33
  29. data/docs/index.md +9 -1
  30. data/docs/reference/api/base.md +13 -127
  31. data/docs/reference/api/route.md +1 -1
  32. data/docs/reference/cli.md +0 -78
  33. data/docs/reference/configuration_keys.md +42 -0
  34. data/docs/reference/environment_variables.md +25 -27
  35. data/lib/wayfarer/base.rb +32 -32
  36. data/lib/wayfarer/callbacks.rb +71 -0
  37. data/lib/wayfarer/cli/base.rb +23 -1
  38. data/lib/wayfarer/cli/job.rb +7 -9
  39. data/lib/wayfarer/cli/route.rb +6 -4
  40. data/lib/wayfarer/cli/route_printer.rb +7 -7
  41. data/lib/wayfarer/cli/templates/job.rb.tt +3 -1
  42. data/lib/wayfarer/config/capybara.rb +10 -0
  43. data/lib/wayfarer/config/ferrum.rb +11 -0
  44. data/lib/wayfarer/config/networking.rb +26 -0
  45. data/lib/wayfarer/config/redis.rb +14 -0
  46. data/lib/wayfarer/config/root.rb +11 -0
  47. data/lib/wayfarer/config/selenium.rb +21 -0
  48. data/lib/wayfarer/config/strconv.rb +45 -0
  49. data/lib/wayfarer/config/struct.rb +72 -0
  50. data/lib/wayfarer/gc.rb +3 -8
  51. data/lib/wayfarer/handler.rb +15 -0
  52. data/lib/wayfarer/middleware/base.rb +19 -0
  53. data/lib/wayfarer/middleware/chain.rb +8 -0
  54. data/lib/wayfarer/middleware/controller.rb +40 -0
  55. data/lib/wayfarer/middleware/dedup.rb +5 -0
  56. data/lib/wayfarer/middleware/dispatch.rb +22 -0
  57. data/lib/wayfarer/middleware/fetch.rb +35 -11
  58. data/lib/wayfarer/middleware/lazy.rb +11 -0
  59. data/lib/wayfarer/middleware/normalize.rb +2 -0
  60. data/lib/wayfarer/middleware/router.rb +41 -3
  61. data/lib/wayfarer/middleware/stage.rb +6 -2
  62. data/lib/wayfarer/networking/capybara.rb +28 -0
  63. data/lib/wayfarer/networking/context.rb +37 -0
  64. data/lib/wayfarer/networking/ferrum.rb +18 -52
  65. data/lib/wayfarer/networking/follow.rb +22 -0
  66. data/lib/wayfarer/networking/http.rb +34 -0
  67. data/lib/wayfarer/networking/pool.rb +20 -14
  68. data/lib/wayfarer/networking/result.rb +1 -9
  69. data/lib/wayfarer/networking/selenium.rb +20 -47
  70. data/lib/wayfarer/networking/strategy.rb +38 -0
  71. data/lib/wayfarer/page.rb +3 -4
  72. data/lib/wayfarer/redis/pool.rb +3 -1
  73. data/lib/wayfarer/routing/dsl.rb +8 -8
  74. data/lib/wayfarer/routing/matchers/custom.rb +25 -0
  75. data/lib/wayfarer/routing/matchers/host.rb +21 -0
  76. data/lib/wayfarer/routing/matchers/path.rb +49 -0
  77. data/lib/wayfarer/routing/matchers/query.rb +63 -0
  78. data/lib/wayfarer/routing/matchers/scheme.rb +17 -0
  79. data/lib/wayfarer/routing/matchers/suffix.rb +17 -0
  80. data/lib/wayfarer/routing/matchers/url.rb +17 -0
  81. data/lib/wayfarer/routing/result.rb +0 -5
  82. data/lib/wayfarer/routing/route.rb +7 -1
  83. data/lib/wayfarer/routing/router.rb +28 -0
  84. data/lib/wayfarer/stringify.rb +13 -7
  85. data/lib/wayfarer/task.rb +4 -2
  86. data/lib/wayfarer.rb +5 -10
  87. data/spec/base_spec.rb +45 -40
  88. data/spec/callbacks_spec.rb +102 -0
  89. data/spec/cli/job_spec.rb +11 -7
  90. data/spec/config/capybara_spec.rb +18 -0
  91. data/spec/config/ferrum_spec.rb +24 -0
  92. data/spec/config/networking_spec.rb +73 -0
  93. data/spec/config/redis_spec.rb +32 -0
  94. data/spec/config/root_spec.rb +31 -0
  95. data/spec/config/selenium_spec.rb +56 -0
  96. data/spec/config/strconv_spec.rb +58 -0
  97. data/spec/config/struct_spec.rb +66 -0
  98. data/spec/factories/{queue/middleware.rb → middleware.rb} +3 -3
  99. data/spec/factories/{queue/page.rb → page.rb} +3 -3
  100. data/spec/factories/{queue/task.rb → task.rb} +0 -0
  101. data/spec/fixtures/dummy_job.rb +1 -1
  102. data/spec/gc_spec.rb +5 -7
  103. data/spec/handler_spec.rb +11 -0
  104. data/spec/integration/callbacks_spec.rb +85 -0
  105. data/spec/integration/page_spec.rb +62 -0
  106. data/spec/integration/params_spec.rb +56 -0
  107. data/spec/integration/stage_spec.rb +51 -0
  108. data/spec/integration/steering_spec.rb +57 -0
  109. data/spec/middleware/chain_spec.rb +32 -19
  110. data/spec/middleware/controller_spec.rb +86 -0
  111. data/spec/middleware/dedup_spec.rb +20 -8
  112. data/spec/middleware/dispatch_spec.rb +43 -0
  113. data/spec/middleware/fetch_spec.rb +117 -34
  114. data/spec/middleware/normalize_spec.rb +5 -4
  115. data/spec/middleware/router_spec.rb +82 -23
  116. data/spec/middleware/stage_spec.rb +42 -19
  117. data/spec/networking/capybara_spec.rb +12 -0
  118. data/spec/networking/context_spec.rb +127 -0
  119. data/spec/networking/ferrum_spec.rb +6 -22
  120. data/spec/networking/follow_spec.rb +41 -0
  121. data/spec/networking/http_spec.rb +12 -0
  122. data/spec/networking/pool_spec.rb +37 -12
  123. data/spec/networking/selenium_spec.rb +6 -22
  124. data/spec/networking/strategy.rb +170 -0
  125. data/spec/redis/pool_spec.rb +1 -1
  126. data/spec/routing/dsl_spec.rb +10 -10
  127. data/spec/routing/integration_spec.rb +22 -22
  128. data/spec/routing/{custom_matcher_spec.rb → matchers/custom_spec.rb} +4 -4
  129. data/spec/routing/{host_matcher_spec.rb → matchers/host_spec.rb} +6 -6
  130. data/spec/routing/{path_matcher_spec.rb → matchers/path_spec.rb} +6 -6
  131. data/spec/routing/{query_matcher_spec.rb → matchers/query_spec.rb} +15 -15
  132. data/spec/routing/{scheme_matcher_spec.rb → matchers/scheme_spec.rb} +4 -4
  133. data/spec/routing/{suffix_matcher_spec.rb → matchers/suffix_spec.rb} +4 -4
  134. data/spec/routing/{uri_matcher_spec.rb → matchers/uri_spec.rb} +4 -4
  135. data/spec/routing/path_finder_spec.rb +1 -1
  136. data/spec/routing/root_route_spec.rb +2 -2
  137. data/spec/routing/route_spec.rb +2 -2
  138. data/spec/routing/router_spec.rb +24 -0
  139. data/spec/spec_helpers.rb +24 -8
  140. data/spec/support/static/git-scm.com/assets/application-38b0d42ff05ffea45841edebbd14b75b89585646153808e82907c2c5c11f324b.js +772 -0
  141. data/spec/support/static/git-scm.com/assets/application-cafcf280f67db0e6d8168ba98a38da878769a9d5f37793b68ffb963a02d185e0.css +1 -0
  142. data/spec/support/static/git-scm.com/assets/modernize-b3ebe0c31c24f230dc62179d3e1030d2e57a53b1668d9382c0a27dbd44a94beb.js +20 -0
  143. data/spec/support/static/git-scm.com/book/en/v2/Appendix-A:-Git-in-Other-Environments-Git-in-Bash.html +751 -0
  144. data/spec/support/static/git-scm.com/book/en/v2/Appendix-A:-Git-in-Other-Environments-Git-in-PowerShell.html +804 -0
  145. data/spec/support/static/git-scm.com/book/en/v2/Appendix-A:-Git-in-Other-Environments-Git-in-Sublime-Text.html +728 -0
  146. data/spec/support/static/git-scm.com/book/en/v2/Appendix-A:-Git-in-Other-Environments-Git-in-Visual-Studio-Code.html +751 -0
  147. data/spec/support/static/git-scm.com/book/en/v2/Appendix-A:-Git-in-Other-Environments-Git-in-Visual-Studio.html +740 -0
  148. data/spec/support/static/git-scm.com/book/en/v2/Appendix-A:-Git-in-Other-Environments-Git-in-Zsh.html +765 -0
  149. data/spec/support/static/git-scm.com/book/en/v2/Appendix-A:-Git-in-Other-Environments-Graphical-Interfaces.html +931 -0
  150. data/spec/support/static/git-scm.com/book/en/v2/Appendix-A:-Git-in-Other-Environments-Summary.html +702 -0
  151. data/spec/support/static/git-scm.com/book/en/v2/Appendix-B:-Embedding-Git-in-your-Applications-Command-line-Git.html +720 -0
  152. data/spec/support/static/git-scm.com/book/en/v2/Appendix-B:-Embedding-Git-in-your-Applications-Dulwich.html +746 -0
  153. data/spec/support/static/git-scm.com/book/en/v2/Appendix-B:-Embedding-Git-in-your-Applications-JGit.html +889 -0
  154. data/spec/support/static/git-scm.com/book/en/v2/Appendix-B:-Embedding-Git-in-your-Applications-Libgit2.html +1003 -0
  155. data/spec/support/static/git-scm.com/book/en/v2/Appendix-B:-Embedding-Git-in-your-Applications-go-git.html +792 -0
  156. data/spec/support/static/git-scm.com/book/en/v2/Appendix-C:-Git-Commands-Administration.html +745 -0
  157. data/spec/support/static/git-scm.com/book/en/v2/Appendix-C:-Git-Commands-Basic-Snapshotting.html +840 -0
  158. data/spec/support/static/git-scm.com/book/en/v2/Appendix-C:-Git-Commands-Branching-and-Merging.html +829 -0
  159. data/spec/support/static/git-scm.com/book/en/v2/Appendix-C:-Git-Commands-Debugging.html +731 -0
  160. data/spec/support/static/git-scm.com/book/en/v2/Appendix-C:-Git-Commands-Email.html +766 -0
  161. data/spec/support/static/git-scm.com/book/en/v2/Appendix-C:-Git-Commands-External-Systems.html +721 -0
  162. data/spec/support/static/git-scm.com/book/en/v2/Appendix-C:-Git-Commands-Getting-and-Creating-Projects.html +746 -0
  163. data/spec/support/static/git-scm.com/book/en/v2/Appendix-C:-Git-Commands-Inspection-and-Comparison.html +735 -0
  164. data/spec/support/static/git-scm.com/book/en/v2/Appendix-C:-Git-Commands-Patching.html +742 -0
  165. data/spec/support/static/git-scm.com/book/en/v2/Appendix-C:-Git-Commands-Plumbing-Commands.html +715 -0
  166. data/spec/support/static/git-scm.com/book/en/v2/Appendix-C:-Git-Commands-Setup-and-Config.html +863 -0
  167. data/spec/support/static/git-scm.com/book/en/v2/Appendix-C:-Git-Commands-Sharing-and-Updating-Projects.html +802 -0
  168. data/spec/support/static/git-scm.com/book/en/v2/Customizing-Git-An-Example-Git-Enforced-Policy.html +1200 -0
  169. data/spec/support/static/git-scm.com/book/en/v2/Customizing-Git-Git-Attributes.html +1134 -0
  170. data/spec/support/static/git-scm.com/book/en/v2/Customizing-Git-Git-Configuration.html +1315 -0
  171. data/spec/support/static/git-scm.com/book/en/v2/Customizing-Git-Git-Hooks.html +876 -0
  172. data/spec/support/static/git-scm.com/book/en/v2/Customizing-Git-Summary.html +704 -0
  173. data/spec/support/static/git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project.html +1667 -0
  174. data/spec/support/static/git-scm.com/book/en/v2/Distributed-Git-Distributed-Workflows.html +859 -0
  175. data/spec/support/static/git-scm.com/book/en/v2/Distributed-Git-Maintaining-a-Project.html +1354 -0
  176. data/spec/support/static/git-scm.com/book/en/v2/Distributed-Git-Summary.html +704 -0
  177. data/spec/support/static/git-scm.com/book/en/v2/Getting-Started-A-Short-History-of-Git.html +735 -0
  178. data/spec/support/static/git-scm.com/book/en/v2/Getting-Started-About-Version-Control.html +783 -0
  179. data/spec/support/static/git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup.html +889 -0
  180. data/spec/support/static/git-scm.com/book/en/v2/Getting-Started-Getting-Help.html +750 -0
  181. data/spec/support/static/git-scm.com/book/en/v2/Getting-Started-Installing-Git.html +879 -0
  182. data/spec/support/static/git-scm.com/book/en/v2/Getting-Started-Summary.html +704 -0
  183. data/spec/support/static/git-scm.com/book/en/v2/Getting-Started-The-Command-Line.html +711 -0
  184. data/spec/support/static/git-scm.com/book/en/v2/Getting-Started-What-is-Git?.html +857 -0
  185. data/spec/support/static/git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository.html +816 -0
  186. data/spec/support/static/git-scm.com/book/en/v2/Git-Basics-Git-Aliases.html +775 -0
  187. data/spec/support/static/git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository.html +1432 -0
  188. data/spec/support/static/git-scm.com/book/en/v2/Git-Basics-Summary.html +703 -0
  189. data/spec/support/static/git-scm.com/book/en/v2/Git-Basics-Tagging.html +1049 -0
  190. data/spec/support/static/git-scm.com/book/en/v2/Git-Basics-Undoing-Things.html +998 -0
  191. data/spec/support/static/git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History.html +1172 -0
  192. data/spec/support/static/git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes.html +983 -0
  193. data/spec/support/static/git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging.html +1102 -0
  194. data/spec/support/static/git-scm.com/book/en/v2/Git-Branching-Branch-Management.html +946 -0
  195. data/spec/support/static/git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell.html +1020 -0
  196. data/spec/support/static/git-scm.com/book/en/v2/Git-Branching-Branching-Workflows.html +786 -0
  197. data/spec/support/static/git-scm.com/book/en/v2/Git-Branching-Rebasing.html +1028 -0
  198. data/spec/support/static/git-scm.com/book/en/v2/Git-Branching-Remote-Branches.html +1009 -0
  199. data/spec/support/static/git-scm.com/book/en/v2/Git-Branching-Summary.html +705 -0
  200. data/spec/support/static/git-scm.com/book/en/v2/Git-Internals-Environment-Variables.html +1009 -0
  201. data/spec/support/static/git-scm.com/book/en/v2/Git-Internals-Git-Objects.html +1209 -0
  202. data/spec/support/static/git-scm.com/book/en/v2/Git-Internals-Git-References.html +939 -0
  203. data/spec/support/static/git-scm.com/book/en/v2/Git-Internals-Maintenance-and-Data-Recovery.html +1086 -0
  204. data/spec/support/static/git-scm.com/book/en/v2/Git-Internals-Packfiles.html +876 -0
  205. data/spec/support/static/git-scm.com/book/en/v2/Git-Internals-Plumbing-and-Porcelain.html +745 -0
  206. data/spec/support/static/git-scm.com/book/en/v2/Git-Internals-Summary.html +708 -0
  207. data/spec/support/static/git-scm.com/book/en/v2/Git-Internals-The-Refspec.html +872 -0
  208. data/spec/support/static/git-scm.com/book/en/v2/Git-Internals-Transfer-Protocols.html +1043 -0
  209. data/spec/support/static/git-scm.com/book/en/v2/Git-Tools-Advanced-Merging.html +1605 -0
  210. data/spec/support/static/git-scm.com/book/en/v2/Git-Tools-Bundling.html +888 -0
  211. data/spec/support/static/git-scm.com/book/en/v2/Git-Tools-Credential-Storage.html +1035 -0
  212. data/spec/support/static/git-scm.com/book/en/v2/Git-Tools-Debugging-with-Git.html +861 -0
  213. data/spec/support/static/git-scm.com/book/en/v2/Git-Tools-Interactive-Staging.html +920 -0
  214. data/spec/support/static/git-scm.com/book/en/v2/Git-Tools-Replace.html +949 -0
  215. data/spec/support/static/git-scm.com/book/en/v2/Git-Tools-Rerere.html +983 -0
  216. data/spec/support/static/git-scm.com/book/en/v2/Git-Tools-Reset-Demystified.html +1236 -0
  217. data/spec/support/static/git-scm.com/book/en/v2/Git-Tools-Revision-Selection.html +1178 -0
  218. data/spec/support/static/git-scm.com/book/en/v2/Git-Tools-Rewriting-History.html +1182 -0
  219. data/spec/support/static/git-scm.com/book/en/v2/Git-Tools-Searching.html +875 -0
  220. data/spec/support/static/git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work.html +922 -0
  221. data/spec/support/static/git-scm.com/book/en/v2/Git-Tools-Stashing-and-Cleaning.html +1039 -0
  222. data/spec/support/static/git-scm.com/book/en/v2/Git-Tools-Submodules.html +1864 -0
  223. data/spec/support/static/git-scm.com/book/en/v2/Git-Tools-Summary.html +705 -0
  224. data/spec/support/static/git-scm.com/book/en/v2/Git-and-Other-Systems-Git-as-a-Client.html +2656 -0
  225. data/spec/support/static/git-scm.com/book/en/v2/Git-and-Other-Systems-Migrating-to-Git.html +1741 -0
  226. data/spec/support/static/git-scm.com/book/en/v2/Git-and-Other-Systems-Summary.html +703 -0
  227. data/spec/support/static/git-scm.com/book/en/v2/Git-on-the-Server-Generating-Your-SSH-Public-Key.html +759 -0
  228. data/spec/support/static/git-scm.com/book/en/v2/Git-on-the-Server-Getting-Git-on-a-Server.html +827 -0
  229. data/spec/support/static/git-scm.com/book/en/v2/Git-on-the-Server-Git-Daemon.html +775 -0
  230. data/spec/support/static/git-scm.com/book/en/v2/Git-on-the-Server-GitLab.html +872 -0
  231. data/spec/support/static/git-scm.com/book/en/v2/Git-on-the-Server-GitWeb.html +776 -0
  232. data/spec/support/static/git-scm.com/book/en/v2/Git-on-the-Server-Setting-Up-the-Server.html +870 -0
  233. data/spec/support/static/git-scm.com/book/en/v2/Git-on-the-Server-Smart-HTTP.html +789 -0
  234. data/spec/support/static/git-scm.com/book/en/v2/Git-on-the-Server-Summary.html +709 -0
  235. data/spec/support/static/git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols.html +963 -0
  236. data/spec/support/static/git-scm.com/book/en/v2/Git-on-the-Server-Third-Party-Hosted-Options.html +711 -0
  237. data/spec/support/static/git-scm.com/book/en/v2/GitHub-Account-Setup-and-Configuration.html +858 -0
  238. data/spec/support/static/git-scm.com/book/en/v2/GitHub-Contributing-to-a-Project.html +1502 -0
  239. data/spec/support/static/git-scm.com/book/en/v2/GitHub-Maintaining-a-Project.html +1218 -0
  240. data/spec/support/static/git-scm.com/book/en/v2/GitHub-Managing-an-organization.html +797 -0
  241. data/spec/support/static/git-scm.com/book/en/v2/GitHub-Scripting-GitHub.html +1059 -0
  242. data/spec/support/static/git-scm.com/book/en/v2/GitHub-Summary.html +704 -0
  243. data/spec/support/static/git-scm.com/book/en/v2/ch00/_abort_merge.html +1605 -0
  244. data/spec/support/static/git-scm.com/book/en/v2/ch00/_add_email_addresses.html +858 -0
  245. data/spec/support/static/git-scm.com/book/en/v2/ch00/_advanced_merging.html +1605 -0
  246. data/spec/support/static/git-scm.com/book/en/v2/ch00/_an_example_git_enforced_policy.html +1200 -0
  247. data/spec/support/static/git-scm.com/book/en/v2/ch00/_annotated_tags.html +1049 -0
  248. data/spec/support/static/git-scm.com/book/en/v2/ch00/_api_comment.html +1059 -0
  249. data/spec/support/static/git-scm.com/book/en/v2/ch00/_bare_repo.html +827 -0
  250. data/spec/support/static/git-scm.com/book/en/v2/ch00/_basic_branching.html +1102 -0
  251. data/spec/support/static/git-scm.com/book/en/v2/ch00/_basic_merge_conflicts.html +1102 -0
  252. data/spec/support/static/git-scm.com/book/en/v2/ch00/_basic_merging.html +1102 -0
  253. data/spec/support/static/git-scm.com/book/en/v2/ch00/_binary_search.html +861 -0
  254. data/spec/support/static/git-scm.com/book/en/v2/ch00/_branch_management.html +946 -0
  255. data/spec/support/static/git-scm.com/book/en/v2/ch00/_branch_references.html +1178 -0
  256. data/spec/support/static/git-scm.com/book/en/v2/ch00/_build_number.html +1354 -0
  257. data/spec/support/static/git-scm.com/book/en/v2/ch00/_bundling.html +888 -0
  258. data/spec/support/static/git-scm.com/book/en/v2/ch00/_changing_multiple.html +1182 -0
  259. data/spec/support/static/git-scm.com/book/en/v2/ch00/_checking_out_conflicts.html +1605 -0
  260. data/spec/support/static/git-scm.com/book/en/v2/ch00/_checking_out_remotes.html +1354 -0
  261. data/spec/support/static/git-scm.com/book/en/v2/ch00/_checking_status.html +1432 -0
  262. data/spec/support/static/git-scm.com/book/en/v2/ch00/_cloning_submodules.html +1864 -0
  263. data/spec/support/static/git-scm.com/book/en/v2/ch00/_commit_guidelines.html +1667 -0
  264. data/spec/support/static/git-scm.com/book/en/v2/ch00/_commit_ranges.html +1178 -0
  265. data/spec/support/static/git-scm.com/book/en/v2/ch00/_commit_status.html +1059 -0
  266. data/spec/support/static/git-scm.com/book/en/v2/ch00/_committing_changes.html +1432 -0
  267. data/spec/support/static/git-scm.com/book/en/v2/ch00/_contrib_file.html +1218 -0
  268. data/spec/support/static/git-scm.com/book/en/v2/ch00/_contributing_project.html +1667 -0
  269. data/spec/support/static/git-scm.com/book/en/v2/ch00/_create_new_branch.html +1020 -0
  270. data/spec/support/static/git-scm.com/book/en/v2/ch00/_credential_caching.html +1035 -0
  271. data/spec/support/static/git-scm.com/book/en/v2/ch00/_custom_importer.html +1741 -0
  272. data/spec/support/static/git-scm.com/book/en/v2/ch00/_data_recovery.html +1086 -0
  273. data/spec/support/static/git-scm.com/book/en/v2/ch00/_delete_branches.html +1009 -0
  274. data/spec/support/static/git-scm.com/book/en/v2/ch00/_editor.html +889 -0
  275. data/spec/support/static/git-scm.com/book/en/v2/ch00/_eg_task_lists.html +1502 -0
  276. data/spec/support/static/git-scm.com/book/en/v2/ch00/_email_hooks.html +876 -0
  277. data/spec/support/static/git-scm.com/book/en/v2/ch00/_email_notification.html +1502 -0
  278. data/spec/support/static/git-scm.com/book/en/v2/ch00/_email_notifications.html +1218 -0
  279. data/spec/support/static/git-scm.com/book/en/v2/ch00/_email_pr.html +1218 -0
  280. data/spec/support/static/git-scm.com/book/en/v2/ch00/_enforcing_commit_message_format.html +1200 -0
  281. data/spec/support/static/git-scm.com/book/en/v2/ch00/_example_markdown.html +1502 -0
  282. data/spec/support/static/git-scm.com/book/en/v2/ch00/_external_merge_tools.html +1315 -0
  283. data/spec/support/static/git-scm.com/book/en/v2/ch00/_fetch_and_push_on_different_repositories.html +1502 -0
  284. data/spec/support/static/git-scm.com/book/en/v2/ch00/_fetching_and_pulling.html +983 -0
  285. data/spec/support/static/git-scm.com/book/en/v2/ch00/_file_annotation.html +861 -0
  286. data/spec/support/static/git-scm.com/book/en/v2/ch00/_first_time.html +889 -0
  287. data/spec/support/static/git-scm.com/book/en/v2/ch00/_generate_ssh_key.html +759 -0
  288. data/spec/support/static/git-scm.com/book/en/v2/ch00/_getting_a_repo.html +816 -0
  289. data/spec/support/static/git-scm.com/book/en/v2/ch00/_getting_git_on_a_server.html +827 -0
  290. data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_aliases.html +775 -0
  291. data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_am.html +1354 -0
  292. data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_amend.html +1182 -0
  293. data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_branches_overview.html +1020 -0
  294. data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_clean.html +1039 -0
  295. data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_cloning.html +816 -0
  296. data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_commit_objects.html +1209 -0
  297. data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_config.html +1315 -0
  298. data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_diff_staged.html +1432 -0
  299. data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_gc.html +1086 -0
  300. data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_grep.html +875 -0
  301. data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_help.html +750 -0
  302. data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_hooks.html +876 -0
  303. data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_mv.html +1432 -0
  304. data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_p4.html +1741 -0
  305. data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_p4_branches.html +2656 -0
  306. data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_reflog.html +1178 -0
  307. data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_refs.html +939 -0
  308. data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_reset.html +1236 -0
  309. data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_stashing.html +1039 -0
  310. data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_submodules.html +1864 -0
  311. data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_svn.html +2656 -0
  312. data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_tagging.html +1049 -0
  313. data/spec/support/static/git-scm.com/book/en/v2/ch00/_gitlab_groups_section.html +872 -0
  314. data/spec/support/static/git-scm.com/book/en/v2/ch00/_ignoring.html +1432 -0
  315. data/spec/support/static/git-scm.com/book/en/v2/ch00/_inspecting_remote.html +983 -0
  316. data/spec/support/static/git-scm.com/book/en/v2/ch00/_integration_manager.html +859 -0
  317. data/spec/support/static/git-scm.com/book/en/v2/ch00/_interactive_staging.html +920 -0
  318. data/spec/support/static/git-scm.com/book/en/v2/ch00/_keyword_expansion.html +1134 -0
  319. data/spec/support/static/git-scm.com/book/en/v2/ch00/_libgit2_bindings.html +1003 -0
  320. data/spec/support/static/git-scm.com/book/en/v2/ch00/_manual_remerge.html +1605 -0
  321. data/spec/support/static/git-scm.com/book/en/v2/ch00/_md_code.html +1502 -0
  322. data/spec/support/static/git-scm.com/book/en/v2/ch00/_md_drag.html +1502 -0
  323. data/spec/support/static/git-scm.com/book/en/v2/ch00/_md_emoji.html +1502 -0
  324. data/spec/support/static/git-scm.com/book/en/v2/ch00/_md_quote.html +1502 -0
  325. data/spec/support/static/git-scm.com/book/en/v2/ch00/_merge_button.html +1218 -0
  326. data/spec/support/static/git-scm.com/book/en/v2/ch00/_merge_log.html +1605 -0
  327. data/spec/support/static/git-scm.com/book/en/v2/ch00/_merge_rebase_work.html +1028 -0
  328. data/spec/support/static/git-scm.com/book/en/v2/ch00/_new_repo_dropdown.html +1218 -0
  329. data/spec/support/static/git-scm.com/book/en/v2/ch00/_not_center.html +1218 -0
  330. data/spec/support/static/git-scm.com/book/en/v2/ch00/_org_page.html +797 -0
  331. data/spec/support/static/git-scm.com/book/en/v2/ch00/_other_client_hooks.html +876 -0
  332. data/spec/support/static/git-scm.com/book/en/v2/ch00/_p4_git_fusion.html +2656 -0
  333. data/spec/support/static/git-scm.com/book/en/v2/ch00/_patches_from_email.html +1354 -0
  334. data/spec/support/static/git-scm.com/book/en/v2/ch00/_personal_avatar.html +858 -0
  335. data/spec/support/static/git-scm.com/book/en/v2/ch00/_plumbing_porcelain.html +745 -0
  336. data/spec/support/static/git-scm.com/book/en/v2/ch00/_pr_closed.html +1502 -0
  337. data/spec/support/static/git-scm.com/book/en/v2/ch00/_pr_discussion.html +1502 -0
  338. data/spec/support/static/git-scm.com/book/en/v2/ch00/_pr_fail.html +1502 -0
  339. data/spec/support/static/git-scm.com/book/en/v2/ch00/_pr_final.html +1502 -0
  340. data/spec/support/static/git-scm.com/book/en/v2/ch00/_pr_references.html +1502 -0
  341. data/spec/support/static/git-scm.com/book/en/v2/ch00/_pr_references_render.html +1502 -0
  342. data/spec/support/static/git-scm.com/book/en/v2/ch00/_pr_refs.html +1218 -0
  343. data/spec/support/static/git-scm.com/book/en/v2/ch00/_pre_merge_rebase_work.html +1028 -0
  344. data/spec/support/static/git-scm.com/book/en/v2/ch00/_preparing_release.html +1354 -0
  345. data/spec/support/static/git-scm.com/book/en/v2/ch00/_private_team.html +1667 -0
  346. data/spec/support/static/git-scm.com/book/en/v2/ch00/_project_over_email.html +1667 -0
  347. data/spec/support/static/git-scm.com/book/en/v2/ch00/_public_project.html +1667 -0
  348. data/spec/support/static/git-scm.com/book/en/v2/ch00/_publishing_submodules.html +1864 -0
  349. data/spec/support/static/git-scm.com/book/en/v2/ch00/_pushing_branches.html +1009 -0
  350. data/spec/support/static/git-scm.com/book/en/v2/ch00/_pushing_refspecs.html +872 -0
  351. data/spec/support/static/git-scm.com/book/en/v2/ch00/_pushing_remotes.html +983 -0
  352. data/spec/support/static/git-scm.com/book/en/v2/ch00/_rebase_cherry_pick.html +1354 -0
  353. data/spec/support/static/git-scm.com/book/en/v2/ch00/_rebase_peril.html +1028 -0
  354. data/spec/support/static/git-scm.com/book/en/v2/ch00/_rebase_rebase.html +1028 -0
  355. data/spec/support/static/git-scm.com/book/en/v2/ch00/_rebase_rebase_work.html +1028 -0
  356. data/spec/support/static/git-scm.com/book/en/v2/ch00/_rebasing.html +1028 -0
  357. data/spec/support/static/git-scm.com/book/en/v2/ch00/_refspec.html +872 -0
  358. data/spec/support/static/git-scm.com/book/en/v2/ch00/_remote_branches.html +1009 -0
  359. data/spec/support/static/git-scm.com/book/en/v2/ch00/_remote_repos.html +983 -0
  360. data/spec/support/static/git-scm.com/book/en/v2/ch00/_removing_file_every_commit.html +1182 -0
  361. data/spec/support/static/git-scm.com/book/en/v2/ch00/_removing_files.html +1432 -0
  362. data/spec/support/static/git-scm.com/book/en/v2/ch00/_removing_objects.html +1086 -0
  363. data/spec/support/static/git-scm.com/book/en/v2/ch00/_replace.html +949 -0
  364. data/spec/support/static/git-scm.com/book/en/v2/ch00/_reverse_commit.html +1605 -0
  365. data/spec/support/static/git-scm.com/book/en/v2/ch00/_revision_selection.html +1178 -0
  366. data/spec/support/static/git-scm.com/book/en/v2/ch00/_rewriting_history.html +1182 -0
  367. data/spec/support/static/git-scm.com/book/en/v2/ch00/_searching.html +875 -0
  368. data/spec/support/static/git-scm.com/book/en/v2/ch00/_service_config.html +1059 -0
  369. data/spec/support/static/git-scm.com/book/en/v2/ch00/_services_hooks.html +1059 -0
  370. data/spec/support/static/git-scm.com/book/en/v2/ch00/_setting_up_server.html +870 -0
  371. data/spec/support/static/git-scm.com/book/en/v2/ch00/_sharing_tags.html +1049 -0
  372. data/spec/support/static/git-scm.com/book/en/v2/ch00/_signing.html +922 -0
  373. data/spec/support/static/git-scm.com/book/en/v2/ch00/_signing_commits.html +922 -0
  374. data/spec/support/static/git-scm.com/book/en/v2/ch00/_squashing.html +1182 -0
  375. data/spec/support/static/git-scm.com/book/en/v2/ch00/_starting_submodules.html +1864 -0
  376. data/spec/support/static/git-scm.com/book/en/v2/ch00/_subtree_merge.html +1605 -0
  377. data/spec/support/static/git-scm.com/book/en/v2/ch00/_switching_branches.html +1020 -0
  378. data/spec/support/static/git-scm.com/book/en/v2/ch00/_tagging_releases.html +1354 -0
  379. data/spec/support/static/git-scm.com/book/en/v2/ch00/_task_list_progress.html +1502 -0
  380. data/spec/support/static/git-scm.com/book/en/v2/ch00/_team_page.html +797 -0
  381. data/spec/support/static/git-scm.com/book/en/v2/ch00/_the_index.html +1236 -0
  382. data/spec/support/static/git-scm.com/book/en/v2/ch00/_the_shortlog.html +1354 -0
  383. data/spec/support/static/git-scm.com/book/en/v2/ch00/_topic_branch.html +786 -0
  384. data/spec/support/static/git-scm.com/book/en/v2/ch00/_tracking_branches.html +1009 -0
  385. data/spec/support/static/git-scm.com/book/en/v2/ch00/_tracking_files.html +1432 -0
  386. data/spec/support/static/git-scm.com/book/en/v2/ch00/_tree_objects.html +1209 -0
  387. data/spec/support/static/git-scm.com/book/en/v2/ch00/_triple_dot.html +1178 -0
  388. data/spec/support/static/git-scm.com/book/en/v2/ch00/_undoing.html +998 -0
  389. data/spec/support/static/git-scm.com/book/en/v2/ch00/_unstaging.html +998 -0
  390. data/spec/support/static/git-scm.com/book/en/v2/ch00/_viewing_history.html +1172 -0
  391. data/spec/support/static/git-scm.com/book/en/v2/ch00/_web_hook.html +1059 -0
  392. data/spec/support/static/git-scm.com/book/en/v2/ch00/_what_is_introduced.html +1354 -0
  393. data/spec/support/static/git-scm.com/book/en/v2/ch00/ch01-getting-started.html +783 -0
  394. data/spec/support/static/git-scm.com/book/en/v2/ch00/ch02-git-basics-chapter.html +816 -0
  395. data/spec/support/static/git-scm.com/book/en/v2/ch00/ch03-git-branching.html +1020 -0
  396. data/spec/support/static/git-scm.com/book/en/v2/ch00/ch05-distributed-git.html +859 -0
  397. data/spec/support/static/git-scm.com/book/en/v2/ch00/ch06-github.html +858 -0
  398. data/spec/support/static/git-scm.com/book/en/v2/ch00/ch06-github_flow.html +1502 -0
  399. data/spec/support/static/git-scm.com/book/en/v2/ch00/ch10-git-internals.html +745 -0
  400. data/spec/support/static/git-scm.com/book/en/v2/ch00/ch_core_editor.html +863 -0
  401. data/spec/support/static/git-scm.com/book/en/v2/ch00/divergent_history.html +1020 -0
  402. data/spec/support/static/git-scm.com/book/en/v2/ch00/double_dot.html +1178 -0
  403. data/spec/support/static/git-scm.com/book/en/v2/ch00/filters_a.html +1134 -0
  404. data/spec/support/static/git-scm.com/book/en/v2/ch00/filters_b.html +1134 -0
  405. data/spec/support/static/git-scm.com/book/en/v2/ch00/limit_options.html +1172 -0
  406. data/spec/support/static/git-scm.com/book/en/v2/ch00/log_options.html +1172 -0
  407. data/spec/support/static/git-scm.com/book/en/v2/ch00/merwf_a.html +1354 -0
  408. data/spec/support/static/git-scm.com/book/en/v2/ch00/merwf_b.html +1354 -0
  409. data/spec/support/static/git-scm.com/book/en/v2/ch00/merwf_c.html +1354 -0
  410. data/spec/support/static/git-scm.com/book/en/v2/ch00/merwf_d.html +1354 -0
  411. data/spec/support/static/git-scm.com/book/en/v2/ch00/merwf_e.html +1354 -0
  412. data/spec/support/static/git-scm.com/book/en/v2/ch00/merwf_f.html +1354 -0
  413. data/spec/support/static/git-scm.com/book/en/v2/ch00/oh_my_zsh_git.html +765 -0
  414. data/spec/support/static/git-scm.com/book/en/v2/ch00/pretty_format.html +1172 -0
  415. data/spec/support/static/git-scm.com/book/en/v2/ch00/psp_b.html +1667 -0
  416. data/spec/support/static/git-scm.com/book/en/v2/ch00/rbdiag_e.html +1028 -0
  417. data/spec/support/static/git-scm.com/book/en/v2/ch00/rbdiag_g.html +1028 -0
  418. data/spec/support/static/git-scm.com/book/en/v2/ch00/rbdiag_h.html +1028 -0
  419. data/spec/support/static/git-scm.com/book/en/v2/ch00/rbdiag_i.html +1028 -0
  420. data/spec/support/static/git-scm.com/book/en/v2/ch00/rebasing-merging-example.html +1028 -0
  421. data/spec/support/static/git-scm.com/book/en/v2/ch00/ref_rerere.html +983 -0
  422. data/spec/support/static/git-scm.com/book/en/v2/ch00/ref_the_ref.html +939 -0
  423. data/spec/support/static/git-scm.com/book/en/v2/ch00/wfdiag_b.html +859 -0
  424. data/spec/support/static/git-scm.com/book/en/v2/ch00/wfdiag_c.html +859 -0
  425. data/spec/support/static/git-scm.com/book/en/v2/ch00/what_is_git_section.html +857 -0
  426. data/spec/support/static/git-scm.com/book/en/v2/images/2fa-1.png +0 -0
  427. data/spec/support/static/git-scm.com/book/en/v2/images/account-settings.png +0 -0
  428. data/spec/support/static/git-scm.com/book/en/v2/images/advance-master.png +0 -0
  429. data/spec/support/static/git-scm.com/book/en/v2/images/advance-testing.png +0 -0
  430. data/spec/support/static/git-scm.com/book/en/v2/images/areas.png +0 -0
  431. data/spec/support/static/git-scm.com/book/en/v2/images/avatar-crop.png +0 -0
  432. data/spec/support/static/git-scm.com/book/en/v2/images/basic-branching-1.png +0 -0
  433. data/spec/support/static/git-scm.com/book/en/v2/images/basic-branching-2.png +0 -0
  434. data/spec/support/static/git-scm.com/book/en/v2/images/basic-branching-3.png +0 -0
  435. data/spec/support/static/git-scm.com/book/en/v2/images/basic-branching-4.png +0 -0
  436. data/spec/support/static/git-scm.com/book/en/v2/images/basic-branching-5.png +0 -0
  437. data/spec/support/static/git-scm.com/book/en/v2/images/basic-branching-6.png +0 -0
  438. data/spec/support/static/git-scm.com/book/en/v2/images/basic-merging-1.png +0 -0
  439. data/spec/support/static/git-scm.com/book/en/v2/images/basic-merging-2.png +0 -0
  440. data/spec/support/static/git-scm.com/book/en/v2/images/basic-rebase-1.png +0 -0
  441. data/spec/support/static/git-scm.com/book/en/v2/images/basic-rebase-2.png +0 -0
  442. data/spec/support/static/git-scm.com/book/en/v2/images/basic-rebase-3.png +0 -0
  443. data/spec/support/static/git-scm.com/book/en/v2/images/basic-rebase-4.png +0 -0
  444. data/spec/support/static/git-scm.com/book/en/v2/images/benevolent-dictator.png +0 -0
  445. data/spec/support/static/git-scm.com/book/en/v2/images/blink-01-start.png +0 -0
  446. data/spec/support/static/git-scm.com/book/en/v2/images/blink-02-pr.png +0 -0
  447. data/spec/support/static/git-scm.com/book/en/v2/images/blink-03-pull-request-open.png +0 -0
  448. data/spec/support/static/git-scm.com/book/en/v2/images/blink-04-email.png +0 -0
  449. data/spec/support/static/git-scm.com/book/en/v2/images/blink-04-pr-comment.png +0 -0
  450. data/spec/support/static/git-scm.com/book/en/v2/images/blink-05-general-comment.png +0 -0
  451. data/spec/support/static/git-scm.com/book/en/v2/images/blink-06-final.png +0 -0
  452. data/spec/support/static/git-scm.com/book/en/v2/images/branch-and-history.png +0 -0
  453. data/spec/support/static/git-scm.com/book/en/v2/images/branch_widget_mac.png +0 -0
  454. data/spec/support/static/git-scm.com/book/en/v2/images/branch_widget_win.png +0 -0
  455. data/spec/support/static/git-scm.com/book/en/v2/images/centralized.png +0 -0
  456. data/spec/support/static/git-scm.com/book/en/v2/images/centralized_workflow.png +0 -0
  457. data/spec/support/static/git-scm.com/book/en/v2/images/checkout-master.png +0 -0
  458. data/spec/support/static/git-scm.com/book/en/v2/images/clean.png +0 -0
  459. data/spec/support/static/git-scm.com/book/en/v2/images/collaborators.png +0 -0
  460. data/spec/support/static/git-scm.com/book/en/v2/images/commit-and-tree.png +0 -0
  461. data/spec/support/static/git-scm.com/book/en/v2/images/commits-and-parents.png +0 -0
  462. data/spec/support/static/git-scm.com/book/en/v2/images/data-model-1.png +0 -0
  463. data/spec/support/static/git-scm.com/book/en/v2/images/data-model-2.png +0 -0
  464. data/spec/support/static/git-scm.com/book/en/v2/images/data-model-3.png +0 -0
  465. data/spec/support/static/git-scm.com/book/en/v2/images/data-model-4.png +0 -0
  466. data/spec/support/static/git-scm.com/book/en/v2/images/deltas.png +0 -0
  467. data/spec/support/static/git-scm.com/book/en/v2/images/distributed.png +0 -0
  468. data/spec/support/static/git-scm.com/book/en/v2/images/double-dot.png +0 -0
  469. data/spec/support/static/git-scm.com/book/en/v2/images/email-settings.png +0 -0
  470. data/spec/support/static/git-scm.com/book/en/v2/images/forkbutton.png +0 -0
  471. data/spec/support/static/git-scm.com/book/en/v2/images/git-bash.png +0 -0
  472. data/spec/support/static/git-scm.com/book/en/v2/images/git-diff-check.png +0 -0
  473. data/spec/support/static/git-scm.com/book/en/v2/images/git-fusion-boot.png +0 -0
  474. data/spec/support/static/git-scm.com/book/en/v2/images/git-fusion-perforce-graph.png +0 -0
  475. data/spec/support/static/git-scm.com/book/en/v2/images/git-gui.png +0 -0
  476. data/spec/support/static/git-scm.com/book/en/v2/images/git-instaweb.png +0 -0
  477. data/spec/support/static/git-scm.com/book/en/v2/images/git-osx-installer.png +0 -0
  478. data/spec/support/static/git-scm.com/book/en/v2/images/github_mac.png +0 -0
  479. data/spec/support/static/git-scm.com/book/en/v2/images/github_win.png +0 -0
  480. data/spec/support/static/git-scm.com/book/en/v2/images/gitk.png +0 -0
  481. data/spec/support/static/git-scm.com/book/en/v2/images/gitlab-groups.png +0 -0
  482. data/spec/support/static/git-scm.com/book/en/v2/images/gitlab-menu.png +0 -0
  483. data/spec/support/static/git-scm.com/book/en/v2/images/gitlab-users.png +0 -0
  484. data/spec/support/static/git-scm.com/book/en/v2/images/head-to-master.png +0 -0
  485. data/spec/support/static/git-scm.com/book/en/v2/images/head-to-testing.png +0 -0
  486. data/spec/support/static/git-scm.com/book/en/v2/images/integration-manager.png +0 -0
  487. data/spec/support/static/git-scm.com/book/en/v2/images/interesting-rebase-1.png +0 -0
  488. data/spec/support/static/git-scm.com/book/en/v2/images/interesting-rebase-2.png +0 -0
  489. data/spec/support/static/git-scm.com/book/en/v2/images/interesting-rebase-3.png +0 -0
  490. data/spec/support/static/git-scm.com/book/en/v2/images/interesting-rebase-4.png +0 -0
  491. data/spec/support/static/git-scm.com/book/en/v2/images/interesting-rebase-5.png +0 -0
  492. data/spec/support/static/git-scm.com/book/en/v2/images/jb.png +0 -0
  493. data/spec/support/static/git-scm.com/book/en/v2/images/large-merges-1.png +0 -0
  494. data/spec/support/static/git-scm.com/book/en/v2/images/large-merges-2.png +0 -0
  495. data/spec/support/static/git-scm.com/book/en/v2/images/lifecycle.png +0 -0
  496. data/spec/support/static/git-scm.com/book/en/v2/images/local.png +0 -0
  497. data/spec/support/static/git-scm.com/book/en/v2/images/lr-branches-1.png +0 -0
  498. data/spec/support/static/git-scm.com/book/en/v2/images/lr-branches-2.png +0 -0
  499. data/spec/support/static/git-scm.com/book/en/v2/images/maint-01-email.png +0 -0
  500. data/spec/support/static/git-scm.com/book/en/v2/images/maint-02-merge.png +0 -0
  501. data/spec/support/static/git-scm.com/book/en/v2/images/maint-03-email-resp.png +0 -0
  502. data/spec/support/static/git-scm.com/book/en/v2/images/maint-04-target.png +0 -0
  503. data/spec/support/static/git-scm.com/book/en/v2/images/maint-05-mentions.png +0 -0
  504. data/spec/support/static/git-scm.com/book/en/v2/images/maint-06-unsubscribe.png +0 -0
  505. data/spec/support/static/git-scm.com/book/en/v2/images/maint-07-notifications.png +0 -0
  506. data/spec/support/static/git-scm.com/book/en/v2/images/maint-08-notifications-page.png +0 -0
  507. data/spec/support/static/git-scm.com/book/en/v2/images/maint-09-contrib.png +0 -0
  508. data/spec/support/static/git-scm.com/book/en/v2/images/maint-10-default-branch.png +0 -0
  509. data/spec/support/static/git-scm.com/book/en/v2/images/maint-11-transfer.png +0 -0
  510. data/spec/support/static/git-scm.com/book/en/v2/images/managed-team-1.png +0 -0
  511. data/spec/support/static/git-scm.com/book/en/v2/images/managed-team-2.png +0 -0
  512. data/spec/support/static/git-scm.com/book/en/v2/images/managed-team-3.png +0 -0
  513. data/spec/support/static/git-scm.com/book/en/v2/images/managed-team-flow.png +0 -0
  514. data/spec/support/static/git-scm.com/book/en/v2/images/markdown-01-example.png +0 -0
  515. data/spec/support/static/git-scm.com/book/en/v2/images/markdown-02-tasks.png +0 -0
  516. data/spec/support/static/git-scm.com/book/en/v2/images/markdown-03-task-summary.png +0 -0
  517. data/spec/support/static/git-scm.com/book/en/v2/images/markdown-04-fenced-code.png +0 -0
  518. data/spec/support/static/git-scm.com/book/en/v2/images/markdown-05-quote.png +0 -0
  519. data/spec/support/static/git-scm.com/book/en/v2/images/markdown-06-emoji-complete.png +0 -0
  520. data/spec/support/static/git-scm.com/book/en/v2/images/markdown-07-emoji.png +0 -0
  521. data/spec/support/static/git-scm.com/book/en/v2/images/markdown-08-drag-drop.png +0 -0
  522. data/spec/support/static/git-scm.com/book/en/v2/images/mentions-01-syntax.png +0 -0
  523. data/spec/support/static/git-scm.com/book/en/v2/images/mentions-02-render.png +0 -0
  524. data/spec/support/static/git-scm.com/book/en/v2/images/mentions-03-closed.png +0 -0
  525. data/spec/support/static/git-scm.com/book/en/v2/images/merging-workflows-1.png +0 -0
  526. data/spec/support/static/git-scm.com/book/en/v2/images/merging-workflows-2.png +0 -0
  527. data/spec/support/static/git-scm.com/book/en/v2/images/merging-workflows-3.png +0 -0
  528. data/spec/support/static/git-scm.com/book/en/v2/images/merging-workflows-4.png +0 -0
  529. data/spec/support/static/git-scm.com/book/en/v2/images/merging-workflows-5.png +0 -0
  530. data/spec/support/static/git-scm.com/book/en/v2/images/new-repo.png +0 -0
  531. data/spec/support/static/git-scm.com/book/en/v2/images/neworg.png +0 -0
  532. data/spec/support/static/git-scm.com/book/en/v2/images/newrepo.png +0 -0
  533. data/spec/support/static/git-scm.com/book/en/v2/images/newrepoform.png +0 -0
  534. data/spec/support/static/git-scm.com/book/en/v2/images/orgs-01-page.png +0 -0
  535. data/spec/support/static/git-scm.com/book/en/v2/images/orgs-02-teams.png +0 -0
  536. data/spec/support/static/git-scm.com/book/en/v2/images/orgs-03-audit.png +0 -0
  537. data/spec/support/static/git-scm.com/book/en/v2/images/p4merge.png +0 -0
  538. data/spec/support/static/git-scm.com/book/en/v2/images/perils-of-rebasing-1.png +0 -0
  539. data/spec/support/static/git-scm.com/book/en/v2/images/perils-of-rebasing-2.png +0 -0
  540. data/spec/support/static/git-scm.com/book/en/v2/images/perils-of-rebasing-3.png +0 -0
  541. data/spec/support/static/git-scm.com/book/en/v2/images/perils-of-rebasing-4.png +0 -0
  542. data/spec/support/static/git-scm.com/book/en/v2/images/perils-of-rebasing-5.png +0 -0
  543. data/spec/support/static/git-scm.com/book/en/v2/images/posh-git.png +0 -0
  544. data/spec/support/static/git-scm.com/book/en/v2/images/pr-01-fail.png +0 -0
  545. data/spec/support/static/git-scm.com/book/en/v2/images/pr-02-merge-fix.png +0 -0
  546. data/spec/support/static/git-scm.com/book/en/v2/images/public-small-1.png +0 -0
  547. data/spec/support/static/git-scm.com/book/en/v2/images/public-small-2.png +0 -0
  548. data/spec/support/static/git-scm.com/book/en/v2/images/public-small-3.png +0 -0
  549. data/spec/support/static/git-scm.com/book/en/v2/images/rebasing-1.png +0 -0
  550. data/spec/support/static/git-scm.com/book/en/v2/images/rebasing-2.png +0 -0
  551. data/spec/support/static/git-scm.com/book/en/v2/images/remote-branches-1.png +0 -0
  552. data/spec/support/static/git-scm.com/book/en/v2/images/remote-branches-2.png +0 -0
  553. data/spec/support/static/git-scm.com/book/en/v2/images/remote-branches-3.png +0 -0
  554. data/spec/support/static/git-scm.com/book/en/v2/images/remote-branches-4.png +0 -0
  555. data/spec/support/static/git-scm.com/book/en/v2/images/remote-branches-5.png +0 -0
  556. data/spec/support/static/git-scm.com/book/en/v2/images/replace1.png +0 -0
  557. data/spec/support/static/git-scm.com/book/en/v2/images/replace2.png +0 -0
  558. data/spec/support/static/git-scm.com/book/en/v2/images/replace3.png +0 -0
  559. data/spec/support/static/git-scm.com/book/en/v2/images/replace4.png +0 -0
  560. data/spec/support/static/git-scm.com/book/en/v2/images/replace5.png +0 -0
  561. data/spec/support/static/git-scm.com/book/en/v2/images/reposettingslink.png +0 -0
  562. data/spec/support/static/git-scm.com/book/en/v2/images/rerere1.png +0 -0
  563. data/spec/support/static/git-scm.com/book/en/v2/images/rerere2.png +0 -0
  564. data/spec/support/static/git-scm.com/book/en/v2/images/rerere3.png +0 -0
  565. data/spec/support/static/git-scm.com/book/en/v2/images/reset-checkout.png +0 -0
  566. data/spec/support/static/git-scm.com/book/en/v2/images/reset-ex1.png +0 -0
  567. data/spec/support/static/git-scm.com/book/en/v2/images/reset-ex2.png +0 -0
  568. data/spec/support/static/git-scm.com/book/en/v2/images/reset-ex3.png +0 -0
  569. data/spec/support/static/git-scm.com/book/en/v2/images/reset-ex4.png +0 -0
  570. data/spec/support/static/git-scm.com/book/en/v2/images/reset-ex5.png +0 -0
  571. data/spec/support/static/git-scm.com/book/en/v2/images/reset-ex6.png +0 -0
  572. data/spec/support/static/git-scm.com/book/en/v2/images/reset-hard.png +0 -0
  573. data/spec/support/static/git-scm.com/book/en/v2/images/reset-mixed.png +0 -0
  574. data/spec/support/static/git-scm.com/book/en/v2/images/reset-path1.png +0 -0
  575. data/spec/support/static/git-scm.com/book/en/v2/images/reset-path2.png +0 -0
  576. data/spec/support/static/git-scm.com/book/en/v2/images/reset-path3.png +0 -0
  577. data/spec/support/static/git-scm.com/book/en/v2/images/reset-soft.png +0 -0
  578. data/spec/support/static/git-scm.com/book/en/v2/images/reset-squash-r1.png +0 -0
  579. data/spec/support/static/git-scm.com/book/en/v2/images/reset-squash-r2.png +0 -0
  580. data/spec/support/static/git-scm.com/book/en/v2/images/reset-squash-r3.png +0 -0
  581. data/spec/support/static/git-scm.com/book/en/v2/images/reset-start.png +0 -0
  582. data/spec/support/static/git-scm.com/book/en/v2/images/reset-workflow.png +0 -0
  583. data/spec/support/static/git-scm.com/book/en/v2/images/scripting-01-services.png +0 -0
  584. data/spec/support/static/git-scm.com/book/en/v2/images/scripting-02-email-service.png +0 -0
  585. data/spec/support/static/git-scm.com/book/en/v2/images/scripting-03-webhook.png +0 -0
  586. data/spec/support/static/git-scm.com/book/en/v2/images/scripting-04-webhook-debug.png +0 -0
  587. data/spec/support/static/git-scm.com/book/en/v2/images/scripting-05-access-token.png +0 -0
  588. data/spec/support/static/git-scm.com/book/en/v2/images/scripting-06-comment.png +0 -0
  589. data/spec/support/static/git-scm.com/book/en/v2/images/scripting-07-status.png +0 -0
  590. data/spec/support/static/git-scm.com/book/en/v2/images/signup.png +0 -0
  591. data/spec/support/static/git-scm.com/book/en/v2/images/small-team-1.png +0 -0
  592. data/spec/support/static/git-scm.com/book/en/v2/images/small-team-2.png +0 -0
  593. data/spec/support/static/git-scm.com/book/en/v2/images/small-team-3.png +0 -0
  594. data/spec/support/static/git-scm.com/book/en/v2/images/small-team-4.png +0 -0
  595. data/spec/support/static/git-scm.com/book/en/v2/images/small-team-5.png +0 -0
  596. data/spec/support/static/git-scm.com/book/en/v2/images/small-team-6.png +0 -0
  597. data/spec/support/static/git-scm.com/book/en/v2/images/small-team-7.png +0 -0
  598. data/spec/support/static/git-scm.com/book/en/v2/images/small-team-flow.png +0 -0
  599. data/spec/support/static/git-scm.com/book/en/v2/images/smudge.png +0 -0
  600. data/spec/support/static/git-scm.com/book/en/v2/images/snapshots.png +0 -0
  601. data/spec/support/static/git-scm.com/book/en/v2/images/ssh-keys.png +0 -0
  602. data/spec/support/static/git-scm.com/book/en/v2/images/topic-branches-1.png +0 -0
  603. data/spec/support/static/git-scm.com/book/en/v2/images/topic-branches-2.png +0 -0
  604. data/spec/support/static/git-scm.com/book/en/v2/images/two-branches.png +0 -0
  605. data/spec/support/static/git-scm.com/book/en/v2/images/undomerge-reset.png +0 -0
  606. data/spec/support/static/git-scm.com/book/en/v2/images/undomerge-revert.png +0 -0
  607. data/spec/support/static/git-scm.com/book/en/v2/images/undomerge-revert2.png +0 -0
  608. data/spec/support/static/git-scm.com/book/en/v2/images/undomerge-revert3.png +0 -0
  609. data/spec/support/static/git-scm.com/book/en/v2/images/undomerge-start.png +0 -0
  610. data/spec/support/static/git-scm.com/book/en/v2/images/your-profile.png +0 -0
  611. data/spec/support/static/git-scm.com/book/en/v2/images/zsh-oh-my.png +0 -0
  612. data/spec/support/static/git-scm.com/book/en/v2/images/zsh-prompt.png +0 -0
  613. data/spec/support/static/git-scm.com/book/en/v2.html +688 -0
  614. data/spec/support/static/git-scm.com/favicon.ico +0 -0
  615. data/spec/support/static/git-scm.com/images/bg/body.jpg +0 -0
  616. data/spec/support/static/git-scm.com/images/bg/isometric-grid.png +0 -0
  617. data/spec/support/static/git-scm.com/images/bg/isometric-grid@2x.png +0 -0
  618. data/spec/support/static/git-scm.com/images/bg/search-header.jpg +0 -0
  619. data/spec/support/static/git-scm.com/images/company-project-logos/android.png +0 -0
  620. data/spec/support/static/git-scm.com/images/company-project-logos/android@2x.png +0 -0
  621. data/spec/support/static/git-scm.com/images/company-project-logos/eclipse.png +0 -0
  622. data/spec/support/static/git-scm.com/images/company-project-logos/eclipse@2x.png +0 -0
  623. data/spec/support/static/git-scm.com/images/company-project-logos/facebook.png +0 -0
  624. data/spec/support/static/git-scm.com/images/company-project-logos/facebook@2x.png +0 -0
  625. data/spec/support/static/git-scm.com/images/company-project-logos/gnome.png +0 -0
  626. data/spec/support/static/git-scm.com/images/company-project-logos/gnome@2x.png +0 -0
  627. data/spec/support/static/git-scm.com/images/company-project-logos/google.png +0 -0
  628. data/spec/support/static/git-scm.com/images/company-project-logos/google@2x.png +0 -0
  629. data/spec/support/static/git-scm.com/images/company-project-logos/kde.png +0 -0
  630. data/spec/support/static/git-scm.com/images/company-project-logos/kde@2x.png +0 -0
  631. data/spec/support/static/git-scm.com/images/company-project-logos/linked-in.png +0 -0
  632. data/spec/support/static/git-scm.com/images/company-project-logos/linked-in@2x.png +0 -0
  633. data/spec/support/static/git-scm.com/images/company-project-logos/linux.png +0 -0
  634. data/spec/support/static/git-scm.com/images/company-project-logos/linux@2x.png +0 -0
  635. data/spec/support/static/git-scm.com/images/company-project-logos/microsoft.png +0 -0
  636. data/spec/support/static/git-scm.com/images/company-project-logos/microsoft@2x.png +0 -0
  637. data/spec/support/static/git-scm.com/images/company-project-logos/netflix.png +0 -0
  638. data/spec/support/static/git-scm.com/images/company-project-logos/netflix@2x.png +0 -0
  639. data/spec/support/static/git-scm.com/images/company-project-logos/perl.png +0 -0
  640. data/spec/support/static/git-scm.com/images/company-project-logos/perl@2x.png +0 -0
  641. data/spec/support/static/git-scm.com/images/company-project-logos/postgresql.png +0 -0
  642. data/spec/support/static/git-scm.com/images/company-project-logos/postgresql@2x.png +0 -0
  643. data/spec/support/static/git-scm.com/images/company-project-logos/qt.png +0 -0
  644. data/spec/support/static/git-scm.com/images/company-project-logos/qt@2x.png +0 -0
  645. data/spec/support/static/git-scm.com/images/company-project-logos/rails.png +0 -0
  646. data/spec/support/static/git-scm.com/images/company-project-logos/rails@2x.png +0 -0
  647. data/spec/support/static/git-scm.com/images/company-project-logos/twitter.png +0 -0
  648. data/spec/support/static/git-scm.com/images/company-project-logos/twitter@2x.png +0 -0
  649. data/spec/support/static/git-scm.com/images/company-project-logos/x.png +0 -0
  650. data/spec/support/static/git-scm.com/images/company-project-logos/x@2x.png +0 -0
  651. data/spec/support/static/git-scm.com/images/epub.png +0 -0
  652. data/spec/support/static/git-scm.com/images/icons/admin-sm.png +0 -0
  653. data/spec/support/static/git-scm.com/images/icons/admin-sm@2x.png +0 -0
  654. data/spec/support/static/git-scm.com/images/icons/apple.png +0 -0
  655. data/spec/support/static/git-scm.com/images/icons/apple@2x.png +0 -0
  656. data/spec/support/static/git-scm.com/images/icons/book.png +0 -0
  657. data/spec/support/static/git-scm.com/images/icons/book@2x.png +0 -0
  658. data/spec/support/static/git-scm.com/images/icons/box.png +0 -0
  659. data/spec/support/static/git-scm.com/images/icons/box@2x.png +0 -0
  660. data/spec/support/static/git-scm.com/images/icons/branch-sm.png +0 -0
  661. data/spec/support/static/git-scm.com/images/icons/branch-sm@2x.png +0 -0
  662. data/spec/support/static/git-scm.com/images/icons/camera-sm.png +0 -0
  663. data/spec/support/static/git-scm.com/images/icons/camera-sm@2x.png +0 -0
  664. data/spec/support/static/git-scm.com/images/icons/chevron-up@2x.png +0 -0
  665. data/spec/support/static/git-scm.com/images/icons/code.png +0 -0
  666. data/spec/support/static/git-scm.com/images/icons/code@2x.png +0 -0
  667. data/spec/support/static/git-scm.com/images/icons/debugging-sm.png +0 -0
  668. data/spec/support/static/git-scm.com/images/icons/debugging-sm@2x.png +0 -0
  669. data/spec/support/static/git-scm.com/images/icons/document.png +0 -0
  670. data/spec/support/static/git-scm.com/images/icons/document@2x.png +0 -0
  671. data/spec/support/static/git-scm.com/images/icons/download.png +0 -0
  672. data/spec/support/static/git-scm.com/images/icons/email-sm.png +0 -0
  673. data/spec/support/static/git-scm.com/images/icons/email-sm@2x.png +0 -0
  674. data/spec/support/static/git-scm.com/images/icons/external-sm.png +0 -0
  675. data/spec/support/static/git-scm.com/images/icons/external-sm@2x.png +0 -0
  676. data/spec/support/static/git-scm.com/images/icons/gui.png +0 -0
  677. data/spec/support/static/git-scm.com/images/icons/gui@2x.png +0 -0
  678. data/spec/support/static/git-scm.com/images/icons/info.png +0 -0
  679. data/spec/support/static/git-scm.com/images/icons/info@2x.png +0 -0
  680. data/spec/support/static/git-scm.com/images/icons/inspection-sm.png +0 -0
  681. data/spec/support/static/git-scm.com/images/icons/inspection-sm@2x.png +0 -0
  682. data/spec/support/static/git-scm.com/images/icons/linux.png +0 -0
  683. data/spec/support/static/git-scm.com/images/icons/linux@2x.png +0 -0
  684. data/spec/support/static/git-scm.com/images/icons/nav-circles.png +0 -0
  685. data/spec/support/static/git-scm.com/images/icons/nav-circles@2x.png +0 -0
  686. data/spec/support/static/git-scm.com/images/icons/patching-sm.png +0 -0
  687. data/spec/support/static/git-scm.com/images/icons/patching-sm@2x.png +0 -0
  688. data/spec/support/static/git-scm.com/images/icons/plumbing-sm.png +0 -0
  689. data/spec/support/static/git-scm.com/images/icons/plumbing-sm@2x.png +0 -0
  690. data/spec/support/static/git-scm.com/images/icons/projects-sm.png +0 -0
  691. data/spec/support/static/git-scm.com/images/icons/projects-sm@2x.png +0 -0
  692. data/spec/support/static/git-scm.com/images/icons/search.png +0 -0
  693. data/spec/support/static/git-scm.com/images/icons/search@2x.png +0 -0
  694. data/spec/support/static/git-scm.com/images/icons/server-admin-sm.png +0 -0
  695. data/spec/support/static/git-scm.com/images/icons/server-admin-sm@2x.png +0 -0
  696. data/spec/support/static/git-scm.com/images/icons/setup-sm.png +0 -0
  697. data/spec/support/static/git-scm.com/images/icons/setup-sm@2x.png +0 -0
  698. data/spec/support/static/git-scm.com/images/icons/sharing-sm.png +0 -0
  699. data/spec/support/static/git-scm.com/images/icons/sharing-sm@2x.png +0 -0
  700. data/spec/support/static/git-scm.com/images/icons/sidebar.png +0 -0
  701. data/spec/support/static/git-scm.com/images/icons/sidebar@2x.png +0 -0
  702. data/spec/support/static/git-scm.com/images/icons/source-code.png +0 -0
  703. data/spec/support/static/git-scm.com/images/icons/source-code@2x.png +0 -0
  704. data/spec/support/static/git-scm.com/images/icons/windows.png +0 -0
  705. data/spec/support/static/git-scm.com/images/icons/windows@2x.png +0 -0
  706. data/spec/support/static/git-scm.com/images/logo@2x.png +0 -0
  707. data/spec/support/static/git-scm.com/images/mobi.png +0 -0
  708. data/spec/support/static/git-scm.com/images/monitor-default.png +0 -0
  709. data/spec/support/static/git-scm.com/images/monitor-default@2x.png +0 -0
  710. data/spec/support/static/git-scm.com/images/monitor-linux.png +0 -0
  711. data/spec/support/static/git-scm.com/images/monitor-linux@2x.png +0 -0
  712. data/spec/support/static/git-scm.com/images/monitor-mac.png +0 -0
  713. data/spec/support/static/git-scm.com/images/monitor-mac@2x.png +0 -0
  714. data/spec/support/static/git-scm.com/images/monitor-windows.png +0 -0
  715. data/spec/support/static/git-scm.com/images/monitor-windows@2x.png +0 -0
  716. data/spec/support/static/git-scm.com/images/pdf.png +0 -0
  717. data/spec/support/static/git-scm.com/images/progit2.png +0 -0
  718. data/spec/support/static/git-scm.com/images/sidebar-divider.png +0 -0
  719. data/spec/support/static/git-scm.com/images/sidebar-divider@2x.png +0 -0
  720. data/spec/support/static/git-scm.com/robots.txt +0 -0
  721. data/spec/task_spec.rb +7 -0
  722. data/spec/wayfarer_spec.rb +1 -1
  723. data/wayfarer.gemspec +9 -8
  724. metadata +692 -47
  725. data/docs/guides/browser_automation/capybara.md +0 -3
  726. data/lib/wayfarer/config.rb +0 -67
  727. data/lib/wayfarer/middleware/worker.rb +0 -47
  728. data/lib/wayfarer/networking/healer.rb +0 -21
  729. data/lib/wayfarer/networking/net_http.rb +0 -52
  730. data/lib/wayfarer/routing/custom_matcher.rb +0 -21
  731. data/lib/wayfarer/routing/host_matcher.rb +0 -23
  732. data/lib/wayfarer/routing/path_matcher.rb +0 -46
  733. data/lib/wayfarer/routing/query_matcher.rb +0 -67
  734. data/lib/wayfarer/routing/scheme_matcher.rb +0 -21
  735. data/lib/wayfarer/routing/suffix_matcher.rb +0 -21
  736. data/lib/wayfarer/routing/url_matcher.rb +0 -21
  737. data/spec/config_spec.rb +0 -144
  738. data/spec/factories/queue/chain.rb +0 -11
  739. data/spec/middleware/worker_spec.rb +0 -90
  740. data/spec/networking/adapter.rb +0 -135
  741. data/spec/networking/healer_spec.rb +0 -46
  742. data/spec/networking/net_http_spec.rb +0 -37
@@ -0,0 +1,1354 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <!-- Global site tag (gtag.js) - Google Analytics -->
6
+ <script async src="https://www.googletagmanager.com/gtag/js?id=UA-49925874-3"></script>
7
+ <script>
8
+ window.dataLayer = window.dataLayer || [];
9
+ function gtag(){dataLayer.push(arguments);}
10
+ gtag('js', new Date());
11
+
12
+ gtag('config', 'UA-49925874-3');
13
+ </script>
14
+
15
+ <meta charset='utf-8'>
16
+ <meta content='IE=edge,chrome=1' http-equiv='X-UA-Compatible'>
17
+ <meta name="viewport" content="width=device-width, initial-scale=1">
18
+ <title>Git - Maintaining a Project</title>
19
+
20
+ <link href='../../../../favicon.ico' rel='shortcut icon' type='image/x-icon'>
21
+
22
+ <link rel="stylesheet" media="screen" href="../../../../assets/application-cafcf280f67db0e6d8168ba98a38da878769a9d5f37793b68ffb963a02d185e0.css" />
23
+ <script src="../../../../assets/modernize-b3ebe0c31c24f230dc62179d3e1030d2e57a53b1668d9382c0a27dbd44a94beb.js"></script>
24
+ <!--[if (gte IE 6)&(lte IE 8)]>
25
+ <script src="/javascripts/selectivizr-min.js"></script>
26
+ <![endif]-->
27
+
28
+ </head>
29
+
30
+ <body id="documentation">
31
+
32
+ <div class="inner">
33
+ <header>
34
+
35
+ <a href="https://git-scm.com/"><img src="../../../../images/logo@2x.png" width="110" height="46" alt="Git" /></a>
36
+ <span id="tagline"></span>
37
+ <script type="text/javascript">
38
+ var taglines = ["fast-version-control","everything-is-local","distributed-even-if-your-workflow-isnt","local-branching-on-the-cheap","distributed-is-the-new-centralized"];
39
+ var tagline = taglines[Math.floor(Math.random() * taglines.length)];
40
+ document.getElementById('tagline').innerHTML = '--' + tagline;
41
+ </script>
42
+ <form id="search" action="https://git-scm.com/search/results">
43
+ <input id="search-text" name="search" placeholder="Search entire site..." autocomplete="off" type="text" />
44
+ </form>
45
+ <div id="search-results"></div>
46
+
47
+ </header>
48
+
49
+ </div> <!-- .inner -->
50
+
51
+ <div class="inner">
52
+ <div id="content-wrapper">
53
+ <button class="sidebar-btn"></button>
54
+ <aside class="sidebar" id="sidebar">
55
+ <nav>
56
+ <ul>
57
+ <li>
58
+ <a href="https://git-scm.com/about">About</a>
59
+ <ul class="">
60
+ <li>
61
+ <a href="https://git-scm.com/about">Branching and Merging</a>
62
+ </li>
63
+ <li>
64
+ <a href="https://git-scm.com/about/small-and-fast">Small and Fast</a>
65
+ </li>
66
+ <li>
67
+ <a href="https://git-scm.com/about/distributed">Distributed</a>
68
+ </li>
69
+ <li>
70
+ <a href="https://git-scm.com/about/info-assurance">Data Assurance</a>
71
+ </li>
72
+ <li>
73
+ <a href="https://git-scm.com/about/staging-area">Staging Area</a>
74
+ </li>
75
+ <li>
76
+ <a href="https://git-scm.com/about/free-and-open-source">Free and Open Source</a>
77
+ </li>
78
+ <li>
79
+ <a href="https://git-scm.com/about/trademark">Trademark</a>
80
+ </li>
81
+ </ul>
82
+ </li>
83
+ <li>
84
+ <a class="active" href="https://git-scm.com/doc">Documentation</a>
85
+ <ul class="expanded">
86
+ <li>
87
+ <a href="https://git-scm.com/docs">Reference</a>
88
+ </li>
89
+ <li>
90
+ <a class="active" href="https://git-scm.com/book">Book</a>
91
+ </li>
92
+ <li>
93
+ <a href="https://git-scm.com/videos">Videos</a>
94
+ </li>
95
+ <li>
96
+ <a href="https://git-scm.com/doc/ext">External Links</a>
97
+ </li>
98
+ </ul>
99
+ </li>
100
+ <li>
101
+ <a href="https://git-scm.com/downloads">Downloads</a>
102
+ <ul class="">
103
+ <li>
104
+ <a href="https://git-scm.com/downloads/guis">GUI Clients</a>
105
+ </li>
106
+ <li>
107
+ <a href="https://git-scm.com/downloads/logos">Logos</a>
108
+ </li>
109
+ </ul>
110
+ </li>
111
+ <li>
112
+ <a href="https://git-scm.com/community">Community</a>
113
+ </li>
114
+ </ul>
115
+ <hr class="sidebar">
116
+ <p>
117
+ This book is available in
118
+ <a href="https://git-scm.com/book/en">English</a>.
119
+ </p>
120
+ <p>
121
+ Full translation available in
122
+ <table>
123
+ <tr><td><a href="https://git-scm.com/book/az">azərbaycan dili</a>,</td></tr>
124
+ <tr><td><a href="https://git-scm.com/book/bg">български език</a>,</td></tr>
125
+ <tr><td><a href="https://git-scm.com/book/de">Deutsch</a>,</td></tr>
126
+ <tr><td><a href="https://git-scm.com/book/es">Español</a>,</td></tr>
127
+ <tr><td><a href="https://git-scm.com/book/fr">Français</a>,</td></tr>
128
+ <tr><td><a href="https://git-scm.com/book/gr">Ελληνικά</a>,</td></tr>
129
+ <tr><td><a href="https://git-scm.com/book/ja">日本語</a>,</td></tr>
130
+ <tr><td><a href="https://git-scm.com/book/ko">한국어</a>,</td></tr>
131
+ <tr><td><a href="https://git-scm.com/book/nl">Nederlands</a>,</td></tr>
132
+ <tr><td><a href="https://git-scm.com/book/ru">Русский</a>,</td></tr>
133
+ <tr><td><a href="https://git-scm.com/book/sl">Slovenščina</a>,</td></tr>
134
+ <tr><td><a href="https://git-scm.com/book/tl">Tagalog</a>,</td></tr>
135
+ <tr><td><a href="https://git-scm.com/book/uk">Українська</a></td></tr>
136
+ <tr><td><a href="https://git-scm.com/book/zh">简体中文</a>,</td></tr>
137
+ </table>
138
+ </p>
139
+ <p>
140
+ Partial translations available in
141
+ <table>
142
+ <tr><td><a href="https://git-scm.com/book/cs">Čeština</a>,</td></tr>
143
+ <tr><td><a href="https://git-scm.com/book/mk">Македонски</a>,</td></tr>
144
+ <tr><td><a href="https://git-scm.com/book/pl">Polski</a>,</td></tr>
145
+ <tr><td><a href="https://git-scm.com/book/sr">Српски</a>,</td></tr>
146
+ <tr><td><a href="https://git-scm.com/book/uz">Ўзбекча</a>,</td></tr>
147
+ <tr><td><a href="https://git-scm.com/book/zh-tw">繁體中文</a>,</td></tr>
148
+ </table>
149
+ </p>
150
+ <p>
151
+ Translations started for
152
+ <table>
153
+ <tr><td><a href="https://git-scm.com/book/be">Беларуская</a>,</td></tr>
154
+ <tr><td><a href="https://git-scm.com/book/fa" dir="rtl">فارسی</a>,</td></tr>
155
+ <tr><td><a href="https://git-scm.com/book/id">Indonesian</a>,</td></tr>
156
+ <tr><td><a href="https://git-scm.com/book/it">Italiano</a>,</td></tr>
157
+ <tr><td><a href="https://git-scm.com/book/ms">Bahasa Melayu</a>,</td></tr>
158
+ <tr><td><a href="https://git-scm.com/book/pt-br">Português (Brasil)</a>,</td></tr>
159
+ <tr><td><a href="https://git-scm.com/book/pt-pt">Português (Portugal)</a>,</td></tr>
160
+ <tr><td><a href="https://git-scm.com/book/sv">Svenska</a>,</td></tr>
161
+ <tr><td><a href="https://git-scm.com/book/tr">Türkçe</a>.</td></tr>
162
+ </table>
163
+ </p>
164
+ <hr class="sidebar"/>
165
+ <p>
166
+ The source of this book is <a href="https://github.com/progit/progit2">hosted on GitHub.</a></br>
167
+ Patches, suggestions and comments are welcome.
168
+ </p>
169
+
170
+
171
+ </nav>
172
+ </aside>
173
+
174
+ <div id="content">
175
+
176
+
177
+ <div id='book-chapters'>
178
+ <a class="dropdown-trigger" id="book-chapters-trigger" data-panel-id="chapters-dropdown" href="_git_am.html#">Chapters ▾</a>
179
+ <div class='dropdown-panel' id='chapters-dropdown'>
180
+ <div class="three-column">
181
+ <div class='column-left'>
182
+ <ol class='book-toc'>
183
+ <li class='chapter'>
184
+ <h2>1. <a href="ch01-getting-started.html">Getting Started</a></h2>
185
+ <ol>
186
+ <li>
187
+ 1.1
188
+ <a href="ch01-getting-started.html" >About Version Control </a>
189
+ </li>
190
+ <li>
191
+ 1.2
192
+ <a href="../Getting-Started-A-Short-History-of-Git.html" >A Short History of Git </a>
193
+ </li>
194
+ <li>
195
+ 1.3
196
+ <a href="what_is_git_section.html" >What is Git? </a>
197
+ </li>
198
+ <li>
199
+ 1.4
200
+ <a href="../Getting-Started-The-Command-Line.html" >The Command Line </a>
201
+ </li>
202
+ <li>
203
+ 1.5
204
+ <a href="../Getting-Started-Installing-Git.html" >Installing Git </a>
205
+ </li>
206
+ <li>
207
+ 1.6
208
+ <a href="_editor.html" >First-Time Git Setup </a>
209
+ </li>
210
+ <li>
211
+ 1.7
212
+ <a href="_git_help.html" >Getting Help </a>
213
+ </li>
214
+ <li>
215
+ 1.8
216
+ <a href="../Getting-Started-Summary.html" >Summary </a>
217
+ </li>
218
+ </ol>
219
+ </li>
220
+ <li class='chapter'>
221
+ <h2>2. <a href="_git_cloning.html">Git Basics</a></h2>
222
+ <ol>
223
+ <li>
224
+ 2.1
225
+ <a href="_git_cloning.html" >Getting a Git Repository </a>
226
+ </li>
227
+ <li>
228
+ 2.2
229
+ <a href="_git_mv.html" >Recording Changes to the Repository </a>
230
+ </li>
231
+ <li>
232
+ 2.3
233
+ <a href="_viewing_history.html" >Viewing the Commit History </a>
234
+ </li>
235
+ <li>
236
+ 2.4
237
+ <a href="_unstaging.html" >Undoing Things </a>
238
+ </li>
239
+ <li>
240
+ 2.5
241
+ <a href="_remote_repos.html" >Working with Remotes </a>
242
+ </li>
243
+ <li>
244
+ 2.6
245
+ <a href="_annotated_tags.html" >Tagging </a>
246
+ </li>
247
+ <li>
248
+ 2.7
249
+ <a href="_git_aliases.html" >Git Aliases </a>
250
+ </li>
251
+ <li>
252
+ 2.8
253
+ <a href="../Git-Basics-Summary.html" >Summary </a>
254
+ </li>
255
+ </ol>
256
+ </li>
257
+ <li class='chapter'>
258
+ <h2>3. <a href="_switching_branches.html">Git Branching</a></h2>
259
+ <ol>
260
+ <li>
261
+ 3.1
262
+ <a href="_switching_branches.html" >Branches in a Nutshell </a>
263
+ </li>
264
+ <li>
265
+ 3.2
266
+ <a href="_basic_branching.html" >Basic Branching and Merging </a>
267
+ </li>
268
+ <li>
269
+ 3.3
270
+ <a href="_branch_management.html" >Branch Management </a>
271
+ </li>
272
+ <li>
273
+ 3.4
274
+ <a href="_topic_branch.html" >Branching Workflows </a>
275
+ </li>
276
+ <li>
277
+ 3.5
278
+ <a href="_delete_branches.html" >Remote Branches </a>
279
+ </li>
280
+ <li>
281
+ 3.6
282
+ <a href="_rebase_rebase.html" >Rebasing </a>
283
+ </li>
284
+ <li>
285
+ 3.7
286
+ <a href="../Git-Branching-Summary.html" >Summary </a>
287
+ </li>
288
+ </ol>
289
+ </li>
290
+ <li class='chapter'>
291
+ <h2>4. <a href="../Git-on-the-Server-The-Protocols.html">Git on the Server</a></h2>
292
+ <ol>
293
+ <li>
294
+ 4.1
295
+ <a href="../Git-on-the-Server-The-Protocols.html" >The Protocols </a>
296
+ </li>
297
+ <li>
298
+ 4.2
299
+ <a href="_bare_repo.html" >Getting Git on a Server </a>
300
+ </li>
301
+ <li>
302
+ 4.3
303
+ <a href="_generate_ssh_key.html" >Generating Your SSH Public Key </a>
304
+ </li>
305
+ <li>
306
+ 4.4
307
+ <a href="_setting_up_server.html" >Setting Up the Server </a>
308
+ </li>
309
+ <li>
310
+ 4.5
311
+ <a href="../Git-on-the-Server-Git-Daemon.html" >Git Daemon </a>
312
+ </li>
313
+ <li>
314
+ 4.6
315
+ <a href="../Git-on-the-Server-Smart-HTTP.html" >Smart HTTP </a>
316
+ </li>
317
+ <li>
318
+ 4.7
319
+ <a href="../Git-on-the-Server-GitWeb.html" >GitWeb </a>
320
+ </li>
321
+ <li>
322
+ 4.8
323
+ <a href="_gitlab_groups_section.html" >GitLab </a>
324
+ </li>
325
+ <li>
326
+ 4.9
327
+ <a href="../Git-on-the-Server-Third-Party-Hosted-Options.html" >Third Party Hosted Options </a>
328
+ </li>
329
+ <li>
330
+ 4.10
331
+ <a href="../Git-on-the-Server-Summary.html" >Summary </a>
332
+ </li>
333
+ </ol>
334
+ </li>
335
+ <li class='chapter'>
336
+ <h2>5. <a href="_integration_manager.html">Distributed Git</a></h2>
337
+ <ol>
338
+ <li>
339
+ 5.1
340
+ <a href="_integration_manager.html" >Distributed Workflows </a>
341
+ </li>
342
+ <li>
343
+ 5.2
344
+ <a href="_project_over_email.html" >Contributing to a Project </a>
345
+ </li>
346
+ <li>
347
+ 5.3
348
+ <a href="_git_am.html" class=active>Maintaining a Project </a>
349
+ </li>
350
+ <li>
351
+ 5.4
352
+ <a href="../Distributed-Git-Summary.html" >Summary </a>
353
+ </li>
354
+ </ol>
355
+ </li>
356
+ </ol>
357
+
358
+ </div>
359
+ <div class='column-middle'>
360
+ <ol class='book-toc'>
361
+ <li class='chapter'>
362
+ <h2>6. <a href="_personal_avatar.html">GitHub</a></h2>
363
+ <ol>
364
+ <li>
365
+ 6.1
366
+ <a href="_personal_avatar.html" >Account Setup and Configuration </a>
367
+ </li>
368
+ <li>
369
+ 6.2
370
+ <a href="_fetch_and_push_on_different_repositories.html" >Contributing to a Project </a>
371
+ </li>
372
+ <li>
373
+ 6.3
374
+ <a href="_email_notifications.html" >Maintaining a Project </a>
375
+ </li>
376
+ <li>
377
+ 6.4
378
+ <a href="_team_page.html" >Managing an organization </a>
379
+ </li>
380
+ <li>
381
+ 6.5
382
+ <a href="_commit_status.html" >Scripting GitHub </a>
383
+ </li>
384
+ <li>
385
+ 6.6
386
+ <a href="../GitHub-Summary.html" >Summary </a>
387
+ </li>
388
+ </ol>
389
+ </li>
390
+ <li class='chapter'>
391
+ <h2>7. <a href="_git_reflog.html">Git Tools</a></h2>
392
+ <ol>
393
+ <li>
394
+ 7.1
395
+ <a href="_git_reflog.html" >Revision Selection </a>
396
+ </li>
397
+ <li>
398
+ 7.2
399
+ <a href="_interactive_staging.html" >Interactive Staging </a>
400
+ </li>
401
+ <li>
402
+ 7.3
403
+ <a href="_git_clean.html" >Stashing and Cleaning </a>
404
+ </li>
405
+ <li>
406
+ 7.4
407
+ <a href="_signing_commits.html" >Signing Your Work </a>
408
+ </li>
409
+ <li>
410
+ 7.5
411
+ <a href="_git_grep.html" >Searching </a>
412
+ </li>
413
+ <li>
414
+ 7.6
415
+ <a href="_removing_file_every_commit.html" >Rewriting History </a>
416
+ </li>
417
+ <li>
418
+ 7.7
419
+ <a href="_the_index.html" >Reset Demystified </a>
420
+ </li>
421
+ <li>
422
+ 7.8
423
+ <a href="_reverse_commit.html" >Advanced Merging </a>
424
+ </li>
425
+ <li>
426
+ 7.9
427
+ <a href="ref_rerere.html" >Rerere </a>
428
+ </li>
429
+ <li>
430
+ 7.10
431
+ <a href="_file_annotation.html" >Debugging with Git </a>
432
+ </li>
433
+ <li>
434
+ 7.11
435
+ <a href="_publishing_submodules.html" >Submodules </a>
436
+ </li>
437
+ <li>
438
+ 7.12
439
+ <a href="_bundling.html" >Bundling </a>
440
+ </li>
441
+ <li>
442
+ 7.13
443
+ <a href="_replace.html" >Replace </a>
444
+ </li>
445
+ <li>
446
+ 7.14
447
+ <a href="_credential_caching.html" >Credential Storage </a>
448
+ </li>
449
+ <li>
450
+ 7.15
451
+ <a href="../Git-Tools-Summary.html" >Summary </a>
452
+ </li>
453
+ </ol>
454
+ </li>
455
+ <li class='chapter'>
456
+ <h2>8. <a href="_external_merge_tools.html">Customizing Git</a></h2>
457
+ <ol>
458
+ <li>
459
+ 8.1
460
+ <a href="_external_merge_tools.html" >Git Configuration </a>
461
+ </li>
462
+ <li>
463
+ 8.2
464
+ <a href="_keyword_expansion.html" >Git Attributes </a>
465
+ </li>
466
+ <li>
467
+ 8.3
468
+ <a href="_email_hooks.html" >Git Hooks </a>
469
+ </li>
470
+ <li>
471
+ 8.4
472
+ <a href="_enforcing_commit_message_format.html" >An Example Git-Enforced Policy </a>
473
+ </li>
474
+ <li>
475
+ 8.5
476
+ <a href="../Customizing-Git-Summary.html" >Summary </a>
477
+ </li>
478
+ </ol>
479
+ </li>
480
+ <li class='chapter'>
481
+ <h2>9. <a href="_git_svn.html">Git and Other Systems</a></h2>
482
+ <ol>
483
+ <li>
484
+ 9.1
485
+ <a href="_git_svn.html" >Git as a Client </a>
486
+ </li>
487
+ <li>
488
+ 9.2
489
+ <a href="_git_p4.html" >Migrating to Git </a>
490
+ </li>
491
+ <li>
492
+ 9.3
493
+ <a href="../Git-and-Other-Systems-Summary.html" >Summary </a>
494
+ </li>
495
+ </ol>
496
+ </li>
497
+ <li class='chapter'>
498
+ <h2>10. <a href="_plumbing_porcelain.html">Git Internals</a></h2>
499
+ <ol>
500
+ <li>
501
+ 10.1
502
+ <a href="_plumbing_porcelain.html" >Plumbing and Porcelain </a>
503
+ </li>
504
+ <li>
505
+ 10.2
506
+ <a href="_git_commit_objects.html" >Git Objects </a>
507
+ </li>
508
+ <li>
509
+ 10.3
510
+ <a href="ref_the_ref.html" >Git References </a>
511
+ </li>
512
+ <li>
513
+ 10.4
514
+ <a href="../Git-Internals-Packfiles.html" >Packfiles </a>
515
+ </li>
516
+ <li>
517
+ 10.5
518
+ <a href="_pushing_refspecs.html" >The Refspec </a>
519
+ </li>
520
+ <li>
521
+ 10.6
522
+ <a href="../Git-Internals-Transfer-Protocols.html" >Transfer Protocols </a>
523
+ </li>
524
+ <li>
525
+ 10.7
526
+ <a href="_git_gc.html" >Maintenance and Data Recovery </a>
527
+ </li>
528
+ <li>
529
+ 10.8
530
+ <a href="../Git-Internals-Environment-Variables.html" >Environment Variables </a>
531
+ </li>
532
+ <li>
533
+ 10.9
534
+ <a href="../Git-Internals-Summary.html" >Summary </a>
535
+ </li>
536
+ </ol>
537
+ </li>
538
+ </ol>
539
+
540
+ </div>
541
+ <div class='column-right'>
542
+ <ol class='book-toc'>
543
+ <li class='chapter'>
544
+ <h2>A1. <a href="../Appendix-A:-Git-in-Other-Environments-Graphical-Interfaces.html">Appendix A: Git in Other Environments</a></h2>
545
+ <ol>
546
+ <li>
547
+ A1.1
548
+ <a href="../Appendix-A:-Git-in-Other-Environments-Graphical-Interfaces.html" >Graphical Interfaces </a>
549
+ </li>
550
+ <li>
551
+ A1.2
552
+ <a href="../Appendix-A:-Git-in-Other-Environments-Git-in-Visual-Studio.html" >Git in Visual Studio </a>
553
+ </li>
554
+ <li>
555
+ A1.3
556
+ <a href="../Appendix-A:-Git-in-Other-Environments-Git-in-Visual-Studio-Code.html" >Git in Visual Studio Code </a>
557
+ </li>
558
+ <li>
559
+ A1.4
560
+ <a href="../Appendix-A:-Git-in-Other-Environments-Git-in-IntelliJ-%252F-PyCharm-%252F-WebStorm-%252F-PhpStorm-%252F-RubyMine.html" >Git in IntelliJ / PyCharm / WebStorm / PhpStorm / RubyMine </a>
561
+ </li>
562
+ <li>
563
+ A1.5
564
+ <a href="../Appendix-A:-Git-in-Other-Environments-Git-in-Sublime-Text.html" >Git in Sublime Text </a>
565
+ </li>
566
+ <li>
567
+ A1.6
568
+ <a href="../Appendix-A:-Git-in-Other-Environments-Git-in-Bash.html" >Git in Bash </a>
569
+ </li>
570
+ <li>
571
+ A1.7
572
+ <a href="oh_my_zsh_git.html" >Git in Zsh </a>
573
+ </li>
574
+ <li>
575
+ A1.8
576
+ <a href="../Appendix-A:-Git-in-Other-Environments-Git-in-PowerShell.html" >Git in PowerShell </a>
577
+ </li>
578
+ <li>
579
+ A1.9
580
+ <a href="../Appendix-A:-Git-in-Other-Environments-Summary.html" >Summary </a>
581
+ </li>
582
+ </ol>
583
+ </li>
584
+ <li class='chapter'>
585
+ <h2>A2. <a href="../Appendix-B:-Embedding-Git-in-your-Applications-Command-line-Git.html">Appendix B: Embedding Git in your Applications</a></h2>
586
+ <ol>
587
+ <li>
588
+ A2.1
589
+ <a href="../Appendix-B:-Embedding-Git-in-your-Applications-Command-line-Git.html" >Command-line Git </a>
590
+ </li>
591
+ <li>
592
+ A2.2
593
+ <a href="_libgit2_bindings.html" >Libgit2 </a>
594
+ </li>
595
+ <li>
596
+ A2.3
597
+ <a href="../Appendix-B:-Embedding-Git-in-your-Applications-JGit.html" >JGit </a>
598
+ </li>
599
+ <li>
600
+ A2.4
601
+ <a href="../Appendix-B:-Embedding-Git-in-your-Applications-go-git.html" >go-git </a>
602
+ </li>
603
+ <li>
604
+ A2.5
605
+ <a href="../Appendix-B:-Embedding-Git-in-your-Applications-Dulwich.html" >Dulwich </a>
606
+ </li>
607
+ </ol>
608
+ </li>
609
+ <li class='chapter'>
610
+ <h2>A3. <a href="ch_core_editor.html">Appendix C: Git Commands</a></h2>
611
+ <ol>
612
+ <li>
613
+ A3.1
614
+ <a href="ch_core_editor.html" >Setup and Config </a>
615
+ </li>
616
+ <li>
617
+ A3.2
618
+ <a href="../Appendix-C:-Git-Commands-Getting-and-Creating-Projects.html" >Getting and Creating Projects </a>
619
+ </li>
620
+ <li>
621
+ A3.3
622
+ <a href="../Appendix-C:-Git-Commands-Basic-Snapshotting.html" >Basic Snapshotting </a>
623
+ </li>
624
+ <li>
625
+ A3.4
626
+ <a href="../Appendix-C:-Git-Commands-Branching-and-Merging.html" >Branching and Merging </a>
627
+ </li>
628
+ <li>
629
+ A3.5
630
+ <a href="../Appendix-C:-Git-Commands-Sharing-and-Updating-Projects.html" >Sharing and Updating Projects </a>
631
+ </li>
632
+ <li>
633
+ A3.6
634
+ <a href="../Appendix-C:-Git-Commands-Inspection-and-Comparison.html" >Inspection and Comparison </a>
635
+ </li>
636
+ <li>
637
+ A3.7
638
+ <a href="../Appendix-C:-Git-Commands-Debugging.html" >Debugging </a>
639
+ </li>
640
+ <li>
641
+ A3.8
642
+ <a href="../Appendix-C:-Git-Commands-Patching.html" >Patching </a>
643
+ </li>
644
+ <li>
645
+ A3.9
646
+ <a href="../Appendix-C:-Git-Commands-Email.html" >Email </a>
647
+ </li>
648
+ <li>
649
+ A3.10
650
+ <a href="../Appendix-C:-Git-Commands-External-Systems.html" >External Systems </a>
651
+ </li>
652
+ <li>
653
+ A3.11
654
+ <a href="../Appendix-C:-Git-Commands-Administration.html" >Administration </a>
655
+ </li>
656
+ <li>
657
+ A3.12
658
+ <a href="../Appendix-C:-Git-Commands-Plumbing-Commands.html" >Plumbing Commands </a>
659
+ </li>
660
+ </ol>
661
+ </li>
662
+ </ol>
663
+
664
+ </div>
665
+ </div>
666
+ </div>
667
+
668
+ <span class="light" id="edition">
669
+ 2nd Edition
670
+ </span>
671
+ </div>
672
+
673
+ <div id='main' class="book edition2">
674
+ <h1>5.3 Distributed Git - Maintaining a Project</h1>
675
+ <div>
676
+ <h2 id="_maintaining_a_project">Maintaining a Project</h2>
677
+ <div class="paragraph">
678
+ <p>
679
+ In addition to knowing how to contribute effectively to a project, you’ll likely need to know how to maintain one.
680
+ This can consist of accepting and applying patches generated via <code>format-patch</code> and emailed to you, or integrating changes in remote branches for repositories you’ve added as remotes to your project.
681
+ Whether you maintain a canonical repository or want to help by verifying or approving patches, you need to know how to accept work in a way that is clearest for other contributors and sustainable by you over the long run.</p>
682
+ </div>
683
+ <div class="sect3">
684
+ <h3 id="_working_in_topic_branches">Working in Topic Branches</h3>
685
+ <div class="paragraph">
686
+ <p>
687
+ When you’re thinking of integrating new work, it’s generally a good idea to try it out in a <em>topic branch</em> — a temporary branch specifically made to try out that new work.
688
+ This way, it’s easy to tweak a patch individually and leave it if it’s not working until you have time to come back to it.
689
+ If you create a simple branch name based on the theme of the work you’re going to try, such as <code>ruby_client</code> or something similarly descriptive, you can easily remember it if you have to abandon it for a while and come back later.
690
+ The maintainer of the Git project tends to namespace these branches as well — such as <code>sc/ruby_client</code>, where <code>sc</code> is short for the person who contributed the work.
691
+ As you’ll remember, you can create the branch based off your <code>master</code> branch like this:</p>
692
+ </div>
693
+ <div class="listingblock">
694
+ <div class="content">
695
+ <pre class="highlight"><code class="language-console" data-lang="console">$ git branch sc/ruby_client master</code></pre>
696
+ </div>
697
+ </div>
698
+ <div class="paragraph">
699
+ <p>Or, if you want to also switch to it immediately, you can use the <code>checkout -b</code> option:</p>
700
+ </div>
701
+ <div class="listingblock">
702
+ <div class="content">
703
+ <pre class="highlight"><code class="language-console" data-lang="console">$ git checkout -b sc/ruby_client master</code></pre>
704
+ </div>
705
+ </div>
706
+ <div class="paragraph">
707
+ <p>Now you’re ready to add the contributed work that you received into this topic branch and determine if you want to merge it into your longer-term branches.</p>
708
+ </div>
709
+ </div>
710
+ <div class="sect3">
711
+ <h3 id="_patches_from_email">Applying Patches from Email</h3>
712
+ <div class="paragraph">
713
+ <p>
714
+ If you receive a patch over email that you need to integrate into your project, you need to apply the patch in your topic branch to evaluate it.
715
+ There are two ways to apply an emailed patch: with <code>git apply</code> or with <code>git am</code>.</p>
716
+ </div>
717
+ <div class="sect4">
718
+ <h4 id="_applying_a_patch_with_apply">Applying a Patch with apply</h4>
719
+ <div class="paragraph">
720
+ <p>
721
+ If you received the patch from someone who generated it with <code>git diff</code> or some variation of the Unix <code>diff</code> command (which is not recommended; see the next section), you can apply it with the <code>git apply</code> command.
722
+ Assuming you saved the patch at <code>/tmp/patch-ruby-client.patch</code>, you can apply the patch like this:</p>
723
+ </div>
724
+ <div class="listingblock">
725
+ <div class="content">
726
+ <pre class="highlight"><code class="language-console" data-lang="console">$ git apply /tmp/patch-ruby-client.patch</code></pre>
727
+ </div>
728
+ </div>
729
+ <div class="paragraph">
730
+ <p>This modifies the files in your working directory.
731
+ It’s almost identical to running a <code>patch -p1</code> command to apply the patch, although it’s more paranoid and accepts fewer fuzzy matches than patch.
732
+ It also handles file adds, deletes, and renames if they’re described in the <code>git diff</code> format, which <code>patch</code> won’t do.
733
+ Finally, <code>git apply</code> is an “apply all or abort all” model where either everything is applied or nothing is, whereas <code>patch</code> can partially apply patchfiles, leaving your working directory in a weird state.
734
+ <code>git apply</code> is overall much more conservative than <code>patch</code>.
735
+ It won’t create a commit for you — after running it, you must stage and commit the changes introduced manually.</p>
736
+ </div>
737
+ <div class="paragraph">
738
+ <p>You can also use <code>git apply</code> to see if a patch applies cleanly before you try actually applying it — you can run <code>git apply --check</code> with the patch:</p>
739
+ </div>
740
+ <div class="listingblock">
741
+ <div class="content">
742
+ <pre class="highlight"><code class="language-console" data-lang="console">$ git apply --check 0001-see-if-this-helps-the-gem.patch
743
+ error: patch failed: ticgit.gemspec:1
744
+ error: ticgit.gemspec: patch does not apply</code></pre>
745
+ </div>
746
+ </div>
747
+ <div class="paragraph">
748
+ <p>If there is no output, then the patch should apply cleanly.
749
+ This command also exits with a non-zero status if the check fails, so you can use it in scripts if you want.</p>
750
+ </div>
751
+ </div>
752
+ <div class="sect4">
753
+ <h4 id="_git_am">Applying a Patch with <code>am</code>
754
+ </h4>
755
+ <div class="paragraph">
756
+ <p>
757
+ If the contributor is a Git user and was good enough to use the <code>format-patch</code> command to generate their patch, then your job is easier because the patch contains author information and a commit message for you.
758
+ If you can, encourage your contributors to use <code>format-patch</code> instead of <code>diff</code> to generate patches for you.
759
+ You should only have to use <code>git apply</code> for legacy patches and things like that.</p>
760
+ </div>
761
+ <div class="paragraph">
762
+ <p>To apply a patch generated by <code>format-patch</code>, you use <code>git am</code> (the command is named <code>am</code> as it is used to "apply a series of patches from a mailbox").
763
+ Technically, <code>git am</code> is built to read an mbox file, which is a simple, plain-text format for storing one or more email messages in one text file.
764
+ It looks something like this:</p>
765
+ </div>
766
+ <div class="listingblock">
767
+ <div class="content">
768
+ <pre class="highlight"><code class="language-console" data-lang="console">From 330090432754092d704da8e76ca5c05c198e71a8 Mon Sep 17 00:00:00 2001
769
+ From: Jessica Smith &lt;jessica@example.com&gt;
770
+ Date: Sun, 6 Apr 2008 10:17:23 -0700
771
+ Subject: [PATCH 1/2] Add limit to log function
772
+
773
+ Limit log functionality to the first 20</code></pre>
774
+ </div>
775
+ </div>
776
+ <div class="paragraph">
777
+ <p>This is the beginning of the output of the <code>git format-patch</code> command that you saw in the previous section; it also represents a valid mbox email format.
778
+ If someone has emailed you the patch properly using <code>git send-email</code>, and you download that into an mbox format, then you can point <code>git am</code> to that mbox file, and it will start applying all the patches it sees.
779
+ If you run a mail client that can save several emails out in mbox format, you can save entire patch series into a file and then use <code>git am</code> to apply them one at a time.</p>
780
+ </div>
781
+ <div class="paragraph">
782
+ <p>However, if someone uploaded a patch file generated via <code>git format-patch</code> to a ticketing system or something similar, you can save the file locally and then pass that file saved on your disk to <code>git am</code> to apply it:</p>
783
+ </div>
784
+ <div class="listingblock">
785
+ <div class="content">
786
+ <pre class="highlight"><code class="language-console" data-lang="console">$ git am 0001-limit-log-function.patch
787
+ Applying: Add limit to log function</code></pre>
788
+ </div>
789
+ </div>
790
+ <div class="paragraph">
791
+ <p>You can see that it applied cleanly and automatically created the new commit for you.
792
+ The author information is taken from the email’s <code>From</code> and <code>Date</code> headers, and the message of the commit is taken from the <code>Subject</code> and body (before the patch) of the email.
793
+ For example, if this patch was applied from the mbox example above, the commit generated would look something like this:</p>
794
+ </div>
795
+ <div class="listingblock">
796
+ <div class="content">
797
+ <pre class="highlight"><code class="language-console" data-lang="console">$ git log --pretty=fuller -1
798
+ commit 6c5e70b984a60b3cecd395edd5b48a7575bf58e0
799
+ Author: Jessica Smith &lt;jessica@example.com&gt;
800
+ AuthorDate: Sun Apr 6 10:17:23 2008 -0700
801
+ Commit: Scott Chacon &lt;schacon@gmail.com&gt;
802
+ CommitDate: Thu Apr 9 09:19:06 2009 -0700
803
+
804
+ Add limit to log function
805
+
806
+ Limit log functionality to the first 20</code></pre>
807
+ </div>
808
+ </div>
809
+ <div class="paragraph">
810
+ <p>The <code>Commit</code> information indicates the person who applied the patch and the time it was applied.
811
+ The <code>Author</code> information is the individual who originally created the patch and when it was originally created.</p>
812
+ </div>
813
+ <div class="paragraph">
814
+ <p>But it’s possible that the patch won’t apply cleanly.
815
+ Perhaps your main branch has diverged too far from the branch the patch was built from, or the patch depends on another patch you haven’t applied yet.
816
+ In that case, the <code>git am</code> process will fail and ask you what you want to do:</p>
817
+ </div>
818
+ <div class="listingblock">
819
+ <div class="content">
820
+ <pre class="highlight"><code class="language-console" data-lang="console">$ git am 0001-see-if-this-helps-the-gem.patch
821
+ Applying: See if this helps the gem
822
+ error: patch failed: ticgit.gemspec:1
823
+ error: ticgit.gemspec: patch does not apply
824
+ Patch failed at 0001.
825
+ When you have resolved this problem run "git am --resolved".
826
+ If you would prefer to skip this patch, instead run "git am --skip".
827
+ To restore the original branch and stop patching run "git am --abort".</code></pre>
828
+ </div>
829
+ </div>
830
+ <div class="paragraph">
831
+ <p>This command puts conflict markers in any files it has issues with, much like a conflicted merge or rebase operation.
832
+ You solve this issue much the same way — edit the file to resolve the conflict, stage the new file, and then run <code>git am --resolved</code> to continue to the next patch:</p>
833
+ </div>
834
+ <div class="listingblock">
835
+ <div class="content">
836
+ <pre class="highlight"><code class="language-console" data-lang="console">$ (fix the file)
837
+ $ git add ticgit.gemspec
838
+ $ git am --resolved
839
+ Applying: See if this helps the gem</code></pre>
840
+ </div>
841
+ </div>
842
+ <div class="paragraph">
843
+ <p>If you want Git to try a bit more intelligently to resolve the conflict, you can pass a <code>-3</code> option to it, which makes Git attempt a three-way merge.
844
+ This option isn’t on by default because it doesn’t work if the commit the patch says it was based on isn’t in your repository.
845
+ If you do have that commit — if the patch was based on a public commit — then the <code>-3</code> option is generally much smarter about applying a conflicting patch:</p>
846
+ </div>
847
+ <div class="listingblock">
848
+ <div class="content">
849
+ <pre class="highlight"><code class="language-console" data-lang="console">$ git am -3 0001-see-if-this-helps-the-gem.patch
850
+ Applying: See if this helps the gem
851
+ error: patch failed: ticgit.gemspec:1
852
+ error: ticgit.gemspec: patch does not apply
853
+ Using index info to reconstruct a base tree...
854
+ Falling back to patching base and 3-way merge...
855
+ No changes -- Patch already applied.</code></pre>
856
+ </div>
857
+ </div>
858
+ <div class="paragraph">
859
+ <p>In this case, without the <code>-3</code> option the patch would have been considered as a conflict.
860
+ Since the <code>-3</code> option was used the patch applied cleanly.</p>
861
+ </div>
862
+ <div class="paragraph">
863
+ <p>If you’re applying a number of patches from an mbox, you can also run the <code>am</code> command in interactive mode, which stops at each patch it finds and asks if you want to apply it:</p>
864
+ </div>
865
+ <div class="listingblock">
866
+ <div class="content">
867
+ <pre class="highlight"><code class="language-console" data-lang="console">$ git am -3 -i mbox
868
+ Commit Body is:
869
+ --------------------------
870
+ See if this helps the gem
871
+ --------------------------
872
+ Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all</code></pre>
873
+ </div>
874
+ </div>
875
+ <div class="paragraph">
876
+ <p>This is nice if you have a number of patches saved, because you can view the patch first if you don’t remember what it is, or not apply the patch if you’ve already done so.</p>
877
+ </div>
878
+ <div class="paragraph">
879
+ <p>When all the patches for your topic are applied and committed into your branch, you can choose whether and how to integrate them into a longer-running branch.</p>
880
+ </div>
881
+ </div>
882
+ </div>
883
+ <div class="sect3">
884
+ <h3 id="_checking_out_remotes">Checking Out Remote Branches</h3>
885
+ <div class="paragraph">
886
+ <p>
887
+ If your contribution came from a Git user who set up their own repository, pushed a number of changes into it, and then sent you the URL to the repository and the name of the remote branch the changes are in, you can add them as a remote and do merges locally.</p>
888
+ </div>
889
+ <div class="paragraph">
890
+ <p>For instance, if Jessica sends you an email saying that she has a great new feature in the <code>ruby-client</code> branch of her repository, you can test it by adding the remote and checking out that branch locally:</p>
891
+ </div>
892
+ <div class="listingblock">
893
+ <div class="content">
894
+ <pre class="highlight"><code class="language-console" data-lang="console">$ git remote add jessica git://github.com/jessica/myproject.git
895
+ $ git fetch jessica
896
+ $ git checkout -b rubyclient jessica/ruby-client</code></pre>
897
+ </div>
898
+ </div>
899
+ <div class="paragraph">
900
+ <p>If she emails you again later with another branch containing another great feature, you could directly <code>fetch</code> and <code>checkout</code> because you already have the remote setup.</p>
901
+ </div>
902
+ <div class="paragraph">
903
+ <p>This is most useful if you’re working with a person consistently.
904
+ If someone only has a single patch to contribute once in a while, then accepting it over email may be less time consuming than requiring everyone to run their own server and having to continually add and remove remotes to get a few patches.
905
+ You’re also unlikely to want to have hundreds of remotes, each for someone who contributes only a patch or two.
906
+ However, scripts and hosted services may make this easier — it depends largely on how you develop and how your contributors develop.</p>
907
+ </div>
908
+ <div class="paragraph">
909
+ <p>The other advantage of this approach is that you get the history of the commits as well.
910
+ Although you may have legitimate merge issues, you know where in your history their work is based; a proper three-way merge is the default rather than having to supply a <code>-3</code> and hope the patch was generated off a public commit to which you have access.</p>
911
+ </div>
912
+ <div class="paragraph">
913
+ <p>If you aren’t working with a person consistently but still want to pull from them in this way, you can provide the URL of the remote repository to the <code>git pull</code> command.
914
+ This does a one-time pull and doesn’t save the URL as a remote reference:</p>
915
+ </div>
916
+ <div class="listingblock">
917
+ <div class="content">
918
+ <pre class="highlight"><code class="language-console" data-lang="console">$ git pull https://github.com/onetimeguy/project
919
+ From https://github.com/onetimeguy/project
920
+ * branch HEAD -&gt; FETCH_HEAD
921
+ Merge made by the 'recursive' strategy.</code></pre>
922
+ </div>
923
+ </div>
924
+ </div>
925
+ <div class="sect3">
926
+ <h3 id="_what_is_introduced">Determining What Is Introduced</h3>
927
+ <div class="paragraph">
928
+ <p>
929
+ Now you have a topic branch that contains contributed work.
930
+ At this point, you can determine what you’d like to do with it.
931
+ This section revisits a couple of commands so you can see how you can use them to review exactly what you’ll be introducing if you merge this into your main branch.</p>
932
+ </div>
933
+ <div class="paragraph">
934
+ <p>It’s often helpful to get a review of all the commits that are in this branch but that aren’t in your <code>master</code> branch.
935
+ You can exclude commits in the <code>master</code> branch by adding the <code>--not</code> option before the branch name.
936
+ This does the same thing as the <code>master..contrib</code> format that we used earlier.
937
+ For example, if your contributor sends you two patches and you create a branch called <code>contrib</code> and applied those patches there, you can run this:</p>
938
+ </div>
939
+ <div class="listingblock">
940
+ <div class="content">
941
+ <pre class="highlight"><code class="language-console" data-lang="console">$ git log contrib --not master
942
+ commit 5b6235bd297351589efc4d73316f0a68d484f118
943
+ Author: Scott Chacon &lt;schacon@gmail.com&gt;
944
+ Date: Fri Oct 24 09:53:59 2008 -0700
945
+
946
+ See if this helps the gem
947
+
948
+ commit 7482e0d16d04bea79d0dba8988cc78df655f16a0
949
+ Author: Scott Chacon &lt;schacon@gmail.com&gt;
950
+ Date: Mon Oct 22 19:38:36 2008 -0700
951
+
952
+ Update gemspec to hopefully work better</code></pre>
953
+ </div>
954
+ </div>
955
+ <div class="paragraph">
956
+ <p>To see what changes each commit introduces, remember that you can pass the <code>-p</code> option to <code>git log</code> and it will append the diff introduced to each commit.</p>
957
+ </div>
958
+ <div class="paragraph">
959
+ <p>To see a full diff of what would happen if you were to merge this topic branch with another branch, you may have to use a weird trick to get the correct results.
960
+ You may think to run this:</p>
961
+ </div>
962
+ <div class="listingblock">
963
+ <div class="content">
964
+ <pre class="highlight"><code class="language-console" data-lang="console">$ git diff master</code></pre>
965
+ </div>
966
+ </div>
967
+ <div class="paragraph">
968
+ <p>This command gives you a diff, but it may be misleading.
969
+ If your <code>master</code> branch has moved forward since you created the topic branch from it, then you’ll get seemingly strange results.
970
+ This happens because Git directly compares the snapshots of the last commit of the topic branch you’re on and the snapshot of the last commit on the <code>master</code> branch.
971
+ For example, if you’ve added a line in a file on the <code>master</code> branch, a direct comparison of the snapshots will look like the topic branch is going to remove that line.</p>
972
+ </div>
973
+ <div class="paragraph">
974
+ <p>If <code>master</code> is a direct ancestor of your topic branch, this isn’t a problem; but if the two histories have diverged, the diff will look like you’re adding all the new stuff in your topic branch and removing everything unique to the <code>master</code> branch.</p>
975
+ </div>
976
+ <div class="paragraph">
977
+ <p>What you really want to see are the changes added to the topic branch — the work you’ll introduce if you merge this branch with <code>master</code>.
978
+ You do that by having Git compare the last commit on your topic branch with the first common ancestor it has with the <code>master</code> branch.</p>
979
+ </div>
980
+ <div class="paragraph">
981
+ <p>Technically, you can do that by explicitly figuring out the common ancestor and then running your diff on it:</p>
982
+ </div>
983
+ <div class="listingblock">
984
+ <div class="content">
985
+ <pre class="highlight"><code class="language-console" data-lang="console">$ git merge-base contrib master
986
+ 36c7dba2c95e6bbb78dfa822519ecfec6e1ca649
987
+ $ git diff 36c7db</code></pre>
988
+ </div>
989
+ </div>
990
+ <div class="paragraph">
991
+ <p>or, more concisely:</p>
992
+ </div>
993
+ <div class="listingblock">
994
+ <div class="content">
995
+ <pre class="highlight"><code class="language-console" data-lang="console">$ git diff $(git merge-base contrib master)</code></pre>
996
+ </div>
997
+ </div>
998
+ <div class="paragraph">
999
+ <p>However, neither of those is particularly convenient, so Git provides another shorthand for doing the same thing: the triple-dot syntax.
1000
+ In the context of the <code>git diff</code> command, you can put three periods after another branch to do a <code>diff</code> between the last commit of the branch you’re on and its common ancestor with another branch:</p>
1001
+ </div>
1002
+ <div class="listingblock">
1003
+ <div class="content">
1004
+ <pre class="highlight"><code class="language-console" data-lang="console">$ git diff master...contrib</code></pre>
1005
+ </div>
1006
+ </div>
1007
+ <div class="paragraph">
1008
+ <p>This command shows you only the work your current topic branch has introduced since its common ancestor with <code>master</code>.
1009
+ That is a very useful syntax to remember.</p>
1010
+ </div>
1011
+ </div>
1012
+ <div class="sect3">
1013
+ <h3 id="_integrating_contributed_work">Integrating Contributed Work</h3>
1014
+ <div class="paragraph">
1015
+ <p>
1016
+ When all the work in your topic branch is ready to be integrated into a more mainline branch, the question is how to do it.
1017
+ Furthermore, what overall workflow do you want to use to maintain your project?
1018
+ You have a number of choices, so we’ll cover a few of them.</p>
1019
+ </div>
1020
+ <div class="sect4">
1021
+ <h4 id="_merging_workflows">Merging Workflows</h4>
1022
+ <div class="paragraph">
1023
+ <p>
1024
+ One basic workflow is to simply merge all that work directly into your <code>master</code> branch.
1025
+ In this scenario, you have a <code>master</code> branch that contains basically stable code.
1026
+ When you have work in a topic branch that you think you’ve completed, or work that someone else has contributed and you’ve verified, you merge it into your master branch, delete that just-merged topic branch, and repeat.</p>
1027
+ </div>
1028
+ <div class="paragraph">
1029
+ <p>For instance, if we have a repository with work in two branches named <code>ruby_client</code> and <code>php_client</code> that looks like <a href="merwf_a.html">History with several topic branches</a>, and we merge <code>ruby_client</code> followed by <code>php_client</code>, your history will end up looking like <a href="merwf_b.html">After a topic branch merge</a>.</p>
1030
+ </div>
1031
+ <div id="merwf_a" class="imageblock">
1032
+ <div class="content">
1033
+ <img src="../images/merging-workflows-1.png" alt="History with several topic branches">
1034
+ </div>
1035
+ <div class="title">Figure 72. History with several topic branches</div>
1036
+ </div>
1037
+ <div id="merwf_b" class="imageblock">
1038
+ <div class="content">
1039
+ <img src="../images/merging-workflows-2.png" alt="After a topic branch merge">
1040
+ </div>
1041
+ <div class="title">Figure 73. After a topic branch merge</div>
1042
+ </div>
1043
+ <div class="paragraph">
1044
+ <p>That is probably the simplest workflow, but it can possibly be problematic if you’re dealing with larger or more stable projects where you want to be really careful about what you introduce.</p>
1045
+ </div>
1046
+ <div class="paragraph">
1047
+ <p>If you have a more important project, you might want to use a two-phase merge cycle.
1048
+ In this scenario, you have two long-running branches, <code>master</code> and <code>develop</code>, in which you determine that <code>master</code> is updated only when a very stable release is cut and all new code is integrated into the <code>develop</code> branch.
1049
+ You regularly push both of these branches to the public repository.
1050
+ Each time you have a new topic branch to merge in (<a href="merwf_c.html">Before a topic branch merge</a>), you merge it into <code>develop</code> (<a href="merwf_d.html">After a topic branch merge</a>); then, when you tag a release, you fast-forward <code>master</code> to wherever the now-stable <code>develop</code> branch is (<a href="merwf_e.html">After a project release</a>).</p>
1051
+ </div>
1052
+ <div id="merwf_c" class="imageblock">
1053
+ <div class="content">
1054
+ <img src="../images/merging-workflows-3.png" alt="Before a topic branch merge">
1055
+ </div>
1056
+ <div class="title">Figure 74. Before a topic branch merge</div>
1057
+ </div>
1058
+ <div id="merwf_d" class="imageblock">
1059
+ <div class="content">
1060
+ <img src="../images/merging-workflows-4.png" alt="After a topic branch merge">
1061
+ </div>
1062
+ <div class="title">Figure 75. After a topic branch merge</div>
1063
+ </div>
1064
+ <div id="merwf_e" class="imageblock">
1065
+ <div class="content">
1066
+ <img src="../images/merging-workflows-5.png" alt="After a topic branch release">
1067
+ </div>
1068
+ <div class="title">Figure 76. After a project release</div>
1069
+ </div>
1070
+ <div class="paragraph">
1071
+ <p>This way, when people clone your project’s repository, they can either check out <code>master</code> to build the latest stable version and keep up to date on that easily, or they can check out <code>develop</code>, which is the more cutting-edge content.
1072
+ You can also extend this concept by having an <code>integrate</code> branch where all the work is merged together.
1073
+ Then, when the codebase on that branch is stable and passes tests, you merge it into a <code>develop</code> branch; and when that has proven itself stable for a while, you fast-forward your <code>master</code> branch.</p>
1074
+ </div>
1075
+ </div>
1076
+ <div class="sect4">
1077
+ <h4 id="_large_merging_workflows">Large-Merging Workflows</h4>
1078
+ <div class="paragraph">
1079
+ <p>
1080
+ The Git project has four long-running branches: <code>master</code>, <code>next</code>, and <code>seen</code> (formerly 'pu' — proposed updates) for new work, and <code>maint</code> for maintenance backports.
1081
+ When new work is introduced by contributors, it’s collected into topic branches in the maintainer’s repository in a manner similar to what we’ve described (see <a href="merwf_f.html">Managing a complex series of parallel contributed topic branches</a>).
1082
+ At this point, the topics are evaluated to determine whether they’re safe and ready for consumption or whether they need more work.
1083
+ If they’re safe, they’re merged into <code>next</code>, and that branch is pushed up so everyone can try the topics integrated together.</p>
1084
+ </div>
1085
+ <div id="merwf_f" class="imageblock">
1086
+ <div class="content">
1087
+ <img src="../images/large-merges-1.png" alt="Managing a complex series of parallel contributed topic branches">
1088
+ </div>
1089
+ <div class="title">Figure 77. Managing a complex series of parallel contributed topic branches</div>
1090
+ </div>
1091
+ <div class="paragraph">
1092
+ <p>If the topics still need work, they’re merged into <code>seen</code> instead.
1093
+ When it’s determined that they’re totally stable, the topics are re-merged into <code>master</code>.
1094
+ The <code>next</code> and <code>seen</code> branches are then rebuilt from the <code>master</code>.
1095
+ This means <code>master</code> almost always moves forward, <code>next</code> is rebased occasionally, and <code>seen</code> is rebased even more often:</p>
1096
+ </div>
1097
+ <div class="imageblock">
1098
+ <div class="content">
1099
+ <img src="../images/large-merges-2.png" alt="Merging contributed topic branches into long-term integration branches">
1100
+ </div>
1101
+ <div class="title">Figure 78. Merging contributed topic branches into long-term integration branches</div>
1102
+ </div>
1103
+ <div class="paragraph">
1104
+ <p>When a topic branch has finally been merged into <code>master</code>, it’s removed from the repository.
1105
+ The Git project also has a <code>maint</code> branch that is forked off from the last release to provide backported patches in case a maintenance release is required.
1106
+ Thus, when you clone the Git repository, you have four branches that you can check out to evaluate the project in different stages of development, depending on how cutting edge you want to be or how you want to contribute; and the maintainer has a structured workflow to help them vet new contributions.
1107
+ The Git project’s workflow is specialized.
1108
+ To clearly understand this you could check out the <a href="https://github.com/git/git/blob/master/Documentation/howto/maintain-git.txt">Git Maintainer’s guide</a>.</p>
1109
+ </div>
1110
+ </div>
1111
+ <div class="sect4">
1112
+ <h4 id="_rebase_cherry_pick">Rebasing and Cherry-Picking Workflows</h4>
1113
+ <div class="paragraph">
1114
+ <p>
1115
+ Other maintainers prefer to rebase or cherry-pick contributed work on top of their <code>master</code> branch, rather than merging it in, to keep a mostly linear history.
1116
+ When you have work in a topic branch and have determined that you want to integrate it, you move to that branch and run the rebase command to rebuild the changes on top of your current <code>master</code> (or <code>develop</code>, and so on) branch.
1117
+ If that works well, you can fast-forward your <code>master</code> branch, and you’ll end up with a linear project history.</p>
1118
+ </div>
1119
+ <div class="paragraph">
1120
+ <p>
1121
+ The other way to move introduced work from one branch to another is to cherry-pick it.
1122
+ A cherry-pick in Git is like a rebase for a single commit.
1123
+ It takes the patch that was introduced in a commit and tries to reapply it on the branch you’re currently on.
1124
+ This is useful if you have a number of commits on a topic branch and you want to integrate only one of them, or if you only have one commit on a topic branch and you’d prefer to cherry-pick it rather than run rebase.
1125
+ For example, suppose you have a project that looks like this:</p>
1126
+ </div>
1127
+ <div class="imageblock">
1128
+ <div class="content">
1129
+ <img src="../images/rebasing-1.png" alt="Example history before a cherry-pick">
1130
+ </div>
1131
+ <div class="title">Figure 79. Example history before a cherry-pick</div>
1132
+ </div>
1133
+ <div class="paragraph">
1134
+ <p>If you want to pull commit <code>e43a6</code> into your <code>master</code> branch, you can run:</p>
1135
+ </div>
1136
+ <div class="listingblock">
1137
+ <div class="content">
1138
+ <pre class="highlight"><code class="language-console" data-lang="console">$ git cherry-pick e43a6
1139
+ Finished one cherry-pick.
1140
+ [master]: created a0a41a9: "More friendly message when locking the index fails."
1141
+ 3 files changed, 17 insertions(+), 3 deletions(-)</code></pre>
1142
+ </div>
1143
+ </div>
1144
+ <div class="paragraph">
1145
+ <p>This pulls the same change introduced in <code>e43a6</code>, but you get a new commit SHA-1 value, because the date applied is different.
1146
+ Now your history looks like this:</p>
1147
+ </div>
1148
+ <div class="imageblock">
1149
+ <div class="content">
1150
+ <img src="../images/rebasing-2.png" alt="History after cherry-picking a commit on a topic branch">
1151
+ </div>
1152
+ <div class="title">Figure 80. History after cherry-picking a commit on a topic branch</div>
1153
+ </div>
1154
+ <div class="paragraph">
1155
+ <p>Now you can remove your topic branch and drop the commits you didn’t want to pull in.</p>
1156
+ </div>
1157
+ </div>
1158
+ <div class="sect4">
1159
+ <h4 id="_rerere">Rerere</h4>
1160
+ <div class="paragraph">
1161
+ <p>
1162
+ If you’re doing lots of merging and rebasing, or you’re maintaining a long-lived topic branch, Git has a feature called “rerere” that can help.</p>
1163
+ </div>
1164
+ <div class="paragraph">
1165
+ <p>Rerere stands for “reuse recorded resolution” — it’s a way of shortcutting manual conflict resolution.
1166
+ When rerere is enabled, Git will keep a set of pre- and post-images from successful merges, and if it notices that there’s a conflict that looks exactly like one you’ve already fixed, it’ll just use the fix from last time, without bothering you with it.</p>
1167
+ </div>
1168
+ <div class="paragraph">
1169
+ <p>This feature comes in two parts: a configuration setting and a command.
1170
+ The configuration setting is <code>rerere.enabled</code>, and it’s handy enough to put in your global config:</p>
1171
+ </div>
1172
+ <div class="listingblock">
1173
+ <div class="content">
1174
+ <pre class="highlight"><code class="language-console" data-lang="console">$ git config --global rerere.enabled true</code></pre>
1175
+ </div>
1176
+ </div>
1177
+ <div class="paragraph">
1178
+ <p>Now, whenever you do a merge that resolves conflicts, the resolution will be recorded in the cache in case you need it in the future.</p>
1179
+ </div>
1180
+ <div class="paragraph">
1181
+ <p>If you need to, you can interact with the rerere cache using the <code>git rerere</code> command.
1182
+ When it’s invoked alone, Git checks its database of resolutions and tries to find a match with any current merge conflicts and resolve them (although this is done automatically if <code>rerere.enabled</code> is set to <code>true</code>).
1183
+ There are also subcommands to see what will be recorded, to erase specific resolution from the cache, and to clear the entire cache.
1184
+ We will cover rerere in more detail in <a href="ref_rerere.html">Rerere</a>.</p>
1185
+ </div>
1186
+ </div>
1187
+ </div>
1188
+ <div class="sect3">
1189
+ <h3 id="_tagging_releases">Tagging Your Releases</h3>
1190
+ <div class="paragraph">
1191
+ <p>
1192
+ When you’ve decided to cut a release, you’ll probably want to assign a tag so you can re-create that release at any point going forward.
1193
+ You can create a new tag as discussed in <a href="ch02-git-basics-chapter.html">Git Basics</a>.
1194
+ If you decide to sign the tag as the maintainer, the tagging may look something like this:</p>
1195
+ </div>
1196
+ <div class="listingblock">
1197
+ <div class="content">
1198
+ <pre class="highlight"><code class="language-console" data-lang="console">$ git tag -s v1.5 -m 'my signed 1.5 tag'
1199
+ You need a passphrase to unlock the secret key for
1200
+ user: "Scott Chacon &lt;schacon@gmail.com&gt;"
1201
+ 1024-bit DSA key, ID F721C45A, created 2009-02-09</code></pre>
1202
+ </div>
1203
+ </div>
1204
+ <div class="paragraph">
1205
+ <p>If you do sign your tags, you may have the problem of distributing the public PGP key used to sign your tags.
1206
+ The maintainer of the Git project has solved this issue by including their public key as a blob in the repository and then adding a tag that points directly to that content.
1207
+ To do this, you can figure out which key you want by running <code>gpg --list-keys</code>:</p>
1208
+ </div>
1209
+ <div class="listingblock">
1210
+ <div class="content">
1211
+ <pre class="highlight"><code class="language-console" data-lang="console">$ gpg --list-keys
1212
+ /Users/schacon/.gnupg/pubring.gpg
1213
+ ---------------------------------
1214
+ pub 1024D/F721C45A 2009-02-09 [expires: 2010-02-09]
1215
+ uid Scott Chacon &lt;schacon@gmail.com&gt;
1216
+ sub 2048g/45D02282 2009-02-09 [expires: 2010-02-09]</code></pre>
1217
+ </div>
1218
+ </div>
1219
+ <div class="paragraph">
1220
+ <p>Then, you can directly import the key into the Git database by exporting it and piping that through <code>git hash-object</code>, which writes a new blob with those contents into Git and gives you back the SHA-1 of the blob:</p>
1221
+ </div>
1222
+ <div class="listingblock">
1223
+ <div class="content">
1224
+ <pre class="highlight"><code class="language-console" data-lang="console">$ gpg -a --export F721C45A | git hash-object -w --stdin
1225
+ 659ef797d181633c87ec71ac3f9ba29fe5775b92</code></pre>
1226
+ </div>
1227
+ </div>
1228
+ <div class="paragraph">
1229
+ <p>Now that you have the contents of your key in Git, you can create a tag that points directly to it by specifying the new SHA-1 value that the <code>hash-object</code> command gave you:</p>
1230
+ </div>
1231
+ <div class="listingblock">
1232
+ <div class="content">
1233
+ <pre class="highlight"><code class="language-console" data-lang="console">$ git tag -a maintainer-pgp-pub 659ef797d181633c87ec71ac3f9ba29fe5775b92</code></pre>
1234
+ </div>
1235
+ </div>
1236
+ <div class="paragraph">
1237
+ <p>If you run <code>git push --tags</code>, the <code>maintainer-pgp-pub</code> tag will be shared with everyone.
1238
+ If anyone wants to verify a tag, they can directly import your PGP key by pulling the blob directly out of the database and importing it into GPG:</p>
1239
+ </div>
1240
+ <div class="listingblock">
1241
+ <div class="content">
1242
+ <pre class="highlight"><code class="language-console" data-lang="console">$ git show maintainer-pgp-pub | gpg --import</code></pre>
1243
+ </div>
1244
+ </div>
1245
+ <div class="paragraph">
1246
+ <p>They can use that key to verify all your signed tags.
1247
+ Also, if you include instructions in the tag message, running <code>git show &lt;tag&gt;</code> will let you give the end user more specific instructions about tag verification.</p>
1248
+ </div>
1249
+ </div>
1250
+ <div class="sect3">
1251
+ <h3 id="_build_number">Generating a Build Number</h3>
1252
+ <div class="paragraph">
1253
+ <p>
1254
+ Because Git doesn’t have monotonically increasing numbers like 'v123' or the equivalent to go with each commit, if you want to have a human-readable name to go with a commit, you can run <code>git describe</code> on that commit.
1255
+ In response, Git generates a string consisting of the name of the most recent tag earlier than that commit, followed by the number of commits since that tag, followed finally by a partial SHA-1 value of the commit being described (prefixed with the letter "g" meaning Git):</p>
1256
+ </div>
1257
+ <div class="listingblock">
1258
+ <div class="content">
1259
+ <pre class="highlight"><code class="language-console" data-lang="console">$ git describe master
1260
+ v1.6.2-rc1-20-g8c5b85c</code></pre>
1261
+ </div>
1262
+ </div>
1263
+ <div class="paragraph">
1264
+ <p>This way, you can export a snapshot or build and name it something understandable to people.
1265
+ In fact, if you build Git from source code cloned from the Git repository, <code>git --version</code> gives you something that looks like this.
1266
+ If you’re describing a commit that you have directly tagged, it gives you simply the tag name.</p>
1267
+ </div>
1268
+ <div class="paragraph">
1269
+ <p>By default, the <code>git describe</code> command requires annotated tags (tags created with the <code>-a</code> or <code>-s</code> flag); if you want to take advantage of lightweight (non-annotated) tags as well, add the <code>--tags</code> option to the command.
1270
+ You can also use this string as the target of a <code>git checkout</code> or <code>git show</code> command, although it relies on the abbreviated SHA-1 value at the end, so it may not be valid forever.
1271
+ For instance, the Linux kernel recently jumped from 8 to 10 characters to ensure SHA-1 object uniqueness, so older <code>git describe</code> output names were invalidated.</p>
1272
+ </div>
1273
+ </div>
1274
+ <div class="sect3">
1275
+ <h3 id="_preparing_release">Preparing a Release</h3>
1276
+ <div class="paragraph">
1277
+ <p>
1278
+ Now you want to release a build.
1279
+ One of the things you’ll want to do is create an archive of the latest snapshot of your code for those poor souls who don’t use Git.
1280
+ The command to do this is <code>git archive</code>:</p>
1281
+ </div>
1282
+ <div class="listingblock">
1283
+ <div class="content">
1284
+ <pre class="highlight"><code class="language-console" data-lang="console">$ git archive master --prefix='project/' | gzip &gt; `git describe master`.tar.gz
1285
+ $ ls *.tar.gz
1286
+ v1.6.2-rc1-20-g8c5b85c.tar.gz</code></pre>
1287
+ </div>
1288
+ </div>
1289
+ <div class="paragraph">
1290
+ <p>If someone opens that tarball, they get the latest snapshot of your project under a <code>project</code> directory.
1291
+ You can also create a zip archive in much the same way, but by passing the <code>--format=zip</code> option to <code>git archive</code>:</p>
1292
+ </div>
1293
+ <div class="listingblock">
1294
+ <div class="content">
1295
+ <pre class="highlight"><code class="language-console" data-lang="console">$ git archive master --prefix='project/' --format=zip &gt; `git describe master`.zip</code></pre>
1296
+ </div>
1297
+ </div>
1298
+ <div class="paragraph">
1299
+ <p>You now have a nice tarball and a zip archive of your project release that you can upload to your website or email to people.</p>
1300
+ </div>
1301
+ </div>
1302
+ <div class="sect3">
1303
+ <h3 id="_the_shortlog">The Shortlog</h3>
1304
+ <div class="paragraph">
1305
+ <p>
1306
+ It’s time to email your mailing list of people who want to know what’s happening in your project.
1307
+ A nice way of quickly getting a sort of changelog of what has been added to your project since your last release or email is to use the <code>git shortlog</code> command.
1308
+ It summarizes all the commits in the range you give it; for example, the following gives you a summary of all the commits since your last release, if your last release was named v1.0.1:</p>
1309
+ </div>
1310
+ <div class="listingblock">
1311
+ <div class="content">
1312
+ <pre class="highlight"><code class="language-console" data-lang="console">$ git shortlog --no-merges master --not v1.0.1
1313
+ Chris Wanstrath (6):
1314
+ Add support for annotated tags to Grit::Tag
1315
+ Add packed-refs annotated tag support.
1316
+ Add Grit::Commit#to_patch
1317
+ Update version and History.txt
1318
+ Remove stray `puts`
1319
+ Make ls_tree ignore nils
1320
+
1321
+ Tom Preston-Werner (4):
1322
+ fix dates in history
1323
+ dynamic version method
1324
+ Version bump to 1.0.2
1325
+ Regenerated gemspec for version 1.0.2</code></pre>
1326
+ </div>
1327
+ </div>
1328
+ <div class="paragraph">
1329
+ <p>You get a clean summary of all the commits since v1.0.1, grouped by author, that you can email to your list.</p>
1330
+ </div>
1331
+ </div>
1332
+ <div id="nav"><a href="_project_over_email.html">prev</a> | <a href="../Distributed-Git-Summary.html">next</a></div></div>
1333
+ </div>
1334
+
1335
+ </div>
1336
+ </div>
1337
+ <footer>
1338
+ <div class="site-source">
1339
+ <a href="https://git-scm.com/site">About this site</a><br>
1340
+ Patches, suggestions, and comments are welcome.
1341
+ </div>
1342
+ <div class="sfc-member">
1343
+ Git is a member of <a href="https://git-scm.com/sfc">Software Freedom Conservancy</a>
1344
+ </div>
1345
+ </footer>
1346
+ <a href="_git_am.html#top" class="no-js scrollToTop" id="scrollToTop" data-label="Scroll to top">
1347
+ <img src="../../../../images/icons/chevron-up@2x.png" width="20" height="20" alt="scroll-to-top"/>
1348
+ </a>
1349
+ <script src="../../../../assets/application-38b0d42ff05ffea45841edebbd14b75b89585646153808e82907c2c5c11f324b.js"></script>
1350
+
1351
+ </div>
1352
+
1353
+ </body>
1354
+ </html>