wayfarer 0.4.1 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +10 -0
- data/Gemfile.lock +15 -11
- data/docs/cookbook/batch_routing.md +22 -0
- data/docs/cookbook/consent_screen.md +36 -0
- data/docs/cookbook/executing_javascript.md +41 -0
- data/docs/cookbook/navigation.md +43 -0
- data/docs/cookbook/querying_html.md +3 -3
- data/docs/cookbook/screenshots.md +2 -2
- data/docs/guides/callbacks.md +5 -5
- data/docs/guides/debugging.md +17 -0
- data/docs/guides/error_handling.md +22 -26
- data/docs/guides/jobs.md +44 -18
- data/docs/guides/navigation.md +73 -0
- data/docs/guides/{browser_automation → networking}/capybara.md +9 -4
- data/docs/guides/{browser_automation → networking}/custom_adapters.md +0 -0
- data/docs/guides/{browser_automation → networking}/ferrum.md +3 -1
- data/docs/guides/networking/http.md +33 -0
- data/docs/guides/{browser_automation → networking}/selenium.md +4 -2
- data/docs/guides/pages.md +4 -4
- data/docs/guides/performance.md +108 -0
- data/docs/guides/reliability.md +41 -0
- data/docs/guides/routing/steering.md +30 -0
- data/docs/guides/tasks.md +9 -33
- data/docs/reference/api/base.md +13 -127
- data/docs/reference/api/route.md +1 -1
- data/docs/reference/cli.md +0 -78
- data/docs/reference/configuration_keys.md +1 -1
- data/lib/wayfarer/base.rb +37 -27
- data/lib/wayfarer/cli/base.rb +19 -1
- data/lib/wayfarer/cli/job.rb +5 -11
- data/lib/wayfarer/cli/route.rb +4 -2
- data/lib/wayfarer/cli/templates/job.rb.tt +3 -1
- data/lib/wayfarer/config/networking.rb +1 -1
- data/lib/wayfarer/config/struct.rb +1 -1
- data/lib/wayfarer/gc.rb +3 -4
- data/lib/wayfarer/handler.rb +15 -0
- data/lib/wayfarer/middleware/base.rb +19 -0
- data/lib/wayfarer/middleware/chain.rb +8 -0
- data/lib/wayfarer/middleware/controller.rb +40 -0
- data/lib/wayfarer/middleware/dedup.rb +5 -0
- data/lib/wayfarer/middleware/dispatch.rb +22 -0
- data/lib/wayfarer/middleware/fetch.rb +33 -13
- data/lib/wayfarer/middleware/lazy.rb +11 -0
- data/lib/wayfarer/middleware/normalize.rb +2 -0
- data/lib/wayfarer/middleware/router.rb +41 -3
- data/lib/wayfarer/middleware/stage.rb +6 -2
- data/lib/wayfarer/networking/context.rb +1 -0
- data/lib/wayfarer/networking/ferrum.rb +1 -0
- data/lib/wayfarer/networking/follow.rb +22 -0
- data/lib/wayfarer/networking/pool.rb +9 -8
- data/lib/wayfarer/networking/result.rb +0 -8
- data/lib/wayfarer/page.rb +1 -1
- data/lib/wayfarer/routing/matchers/custom.rb +2 -0
- data/lib/wayfarer/routing/matchers/host.rb +3 -1
- data/lib/wayfarer/routing/matchers/path.rb +2 -1
- data/lib/wayfarer/routing/result.rb +0 -5
- data/lib/wayfarer/routing/route.rb +6 -0
- data/lib/wayfarer/routing/router.rb +28 -0
- data/lib/wayfarer/serializer.rb +2 -2
- data/lib/wayfarer/stringify.rb +13 -7
- data/lib/wayfarer/task.rb +4 -2
- data/lib/wayfarer.rb +2 -7
- data/spec/base_spec.rb +33 -42
- data/spec/callbacks_spec.rb +2 -2
- data/spec/cli/job_spec.rb +9 -5
- data/spec/config/networking_spec.rb +2 -2
- data/spec/factories/{queue/middleware.rb → middleware.rb} +3 -3
- data/spec/factories/{queue/page.rb → page.rb} +3 -3
- data/spec/factories/{queue/task.rb → task.rb} +0 -0
- data/spec/fixtures/dummy_job.rb +1 -1
- data/spec/gc_spec.rb +5 -9
- data/spec/handler_spec.rb +11 -0
- data/spec/integration/callbacks_spec.rb +85 -0
- data/spec/integration/page_spec.rb +62 -0
- data/spec/integration/params_spec.rb +56 -0
- data/spec/integration/stage_spec.rb +51 -0
- data/spec/integration/steering_spec.rb +57 -0
- data/spec/middleware/chain_spec.rb +32 -19
- data/spec/middleware/controller_spec.rb +86 -0
- data/spec/middleware/dedup_spec.rb +20 -8
- data/spec/middleware/dispatch_spec.rb +43 -0
- data/spec/middleware/fetch_spec.rb +116 -45
- data/spec/middleware/normalize_spec.rb +5 -4
- data/spec/middleware/router_spec.rb +80 -28
- data/spec/middleware/stage_spec.rb +42 -19
- data/spec/networking/follow_spec.rb +41 -0
- data/spec/routing/router_spec.rb +24 -0
- data/spec/spec_helpers.rb +11 -3
- data/spec/support/static/git-scm.com/assets/application-38b0d42ff05ffea45841edebbd14b75b89585646153808e82907c2c5c11f324b.js +772 -0
- data/spec/support/static/git-scm.com/assets/application-cafcf280f67db0e6d8168ba98a38da878769a9d5f37793b68ffb963a02d185e0.css +1 -0
- data/spec/support/static/git-scm.com/assets/modernize-b3ebe0c31c24f230dc62179d3e1030d2e57a53b1668d9382c0a27dbd44a94beb.js +20 -0
- data/spec/support/static/git-scm.com/book/en/v2/Appendix-A:-Git-in-Other-Environments-Git-in-Bash.html +751 -0
- data/spec/support/static/git-scm.com/book/en/v2/Appendix-A:-Git-in-Other-Environments-Git-in-PowerShell.html +804 -0
- data/spec/support/static/git-scm.com/book/en/v2/Appendix-A:-Git-in-Other-Environments-Git-in-Sublime-Text.html +728 -0
- data/spec/support/static/git-scm.com/book/en/v2/Appendix-A:-Git-in-Other-Environments-Git-in-Visual-Studio-Code.html +751 -0
- data/spec/support/static/git-scm.com/book/en/v2/Appendix-A:-Git-in-Other-Environments-Git-in-Visual-Studio.html +740 -0
- data/spec/support/static/git-scm.com/book/en/v2/Appendix-A:-Git-in-Other-Environments-Git-in-Zsh.html +765 -0
- data/spec/support/static/git-scm.com/book/en/v2/Appendix-A:-Git-in-Other-Environments-Graphical-Interfaces.html +931 -0
- data/spec/support/static/git-scm.com/book/en/v2/Appendix-A:-Git-in-Other-Environments-Summary.html +702 -0
- data/spec/support/static/git-scm.com/book/en/v2/Appendix-B:-Embedding-Git-in-your-Applications-Command-line-Git.html +720 -0
- data/spec/support/static/git-scm.com/book/en/v2/Appendix-B:-Embedding-Git-in-your-Applications-Dulwich.html +746 -0
- data/spec/support/static/git-scm.com/book/en/v2/Appendix-B:-Embedding-Git-in-your-Applications-JGit.html +889 -0
- data/spec/support/static/git-scm.com/book/en/v2/Appendix-B:-Embedding-Git-in-your-Applications-Libgit2.html +1003 -0
- data/spec/support/static/git-scm.com/book/en/v2/Appendix-B:-Embedding-Git-in-your-Applications-go-git.html +792 -0
- data/spec/support/static/git-scm.com/book/en/v2/Appendix-C:-Git-Commands-Administration.html +745 -0
- data/spec/support/static/git-scm.com/book/en/v2/Appendix-C:-Git-Commands-Basic-Snapshotting.html +840 -0
- data/spec/support/static/git-scm.com/book/en/v2/Appendix-C:-Git-Commands-Branching-and-Merging.html +829 -0
- data/spec/support/static/git-scm.com/book/en/v2/Appendix-C:-Git-Commands-Debugging.html +731 -0
- data/spec/support/static/git-scm.com/book/en/v2/Appendix-C:-Git-Commands-Email.html +766 -0
- data/spec/support/static/git-scm.com/book/en/v2/Appendix-C:-Git-Commands-External-Systems.html +721 -0
- data/spec/support/static/git-scm.com/book/en/v2/Appendix-C:-Git-Commands-Getting-and-Creating-Projects.html +746 -0
- data/spec/support/static/git-scm.com/book/en/v2/Appendix-C:-Git-Commands-Inspection-and-Comparison.html +735 -0
- data/spec/support/static/git-scm.com/book/en/v2/Appendix-C:-Git-Commands-Patching.html +742 -0
- data/spec/support/static/git-scm.com/book/en/v2/Appendix-C:-Git-Commands-Plumbing-Commands.html +715 -0
- data/spec/support/static/git-scm.com/book/en/v2/Appendix-C:-Git-Commands-Setup-and-Config.html +863 -0
- data/spec/support/static/git-scm.com/book/en/v2/Appendix-C:-Git-Commands-Sharing-and-Updating-Projects.html +802 -0
- data/spec/support/static/git-scm.com/book/en/v2/Customizing-Git-An-Example-Git-Enforced-Policy.html +1200 -0
- data/spec/support/static/git-scm.com/book/en/v2/Customizing-Git-Git-Attributes.html +1134 -0
- data/spec/support/static/git-scm.com/book/en/v2/Customizing-Git-Git-Configuration.html +1315 -0
- data/spec/support/static/git-scm.com/book/en/v2/Customizing-Git-Git-Hooks.html +876 -0
- data/spec/support/static/git-scm.com/book/en/v2/Customizing-Git-Summary.html +704 -0
- data/spec/support/static/git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project.html +1667 -0
- data/spec/support/static/git-scm.com/book/en/v2/Distributed-Git-Distributed-Workflows.html +859 -0
- data/spec/support/static/git-scm.com/book/en/v2/Distributed-Git-Maintaining-a-Project.html +1354 -0
- data/spec/support/static/git-scm.com/book/en/v2/Distributed-Git-Summary.html +704 -0
- data/spec/support/static/git-scm.com/book/en/v2/Getting-Started-A-Short-History-of-Git.html +735 -0
- data/spec/support/static/git-scm.com/book/en/v2/Getting-Started-About-Version-Control.html +783 -0
- data/spec/support/static/git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup.html +889 -0
- data/spec/support/static/git-scm.com/book/en/v2/Getting-Started-Getting-Help.html +750 -0
- data/spec/support/static/git-scm.com/book/en/v2/Getting-Started-Installing-Git.html +879 -0
- data/spec/support/static/git-scm.com/book/en/v2/Getting-Started-Summary.html +704 -0
- data/spec/support/static/git-scm.com/book/en/v2/Getting-Started-The-Command-Line.html +711 -0
- data/spec/support/static/git-scm.com/book/en/v2/Getting-Started-What-is-Git?.html +857 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository.html +816 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Basics-Git-Aliases.html +775 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository.html +1432 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Basics-Summary.html +703 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Basics-Tagging.html +1049 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Basics-Undoing-Things.html +998 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History.html +1172 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes.html +983 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging.html +1102 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Branching-Branch-Management.html +946 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell.html +1020 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Branching-Branching-Workflows.html +786 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Branching-Rebasing.html +1028 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Branching-Remote-Branches.html +1009 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Branching-Summary.html +705 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Internals-Environment-Variables.html +1009 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Internals-Git-Objects.html +1209 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Internals-Git-References.html +939 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Internals-Maintenance-and-Data-Recovery.html +1086 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Internals-Packfiles.html +876 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Internals-Plumbing-and-Porcelain.html +745 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Internals-Summary.html +708 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Internals-The-Refspec.html +872 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Internals-Transfer-Protocols.html +1043 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Tools-Advanced-Merging.html +1605 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Tools-Bundling.html +888 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Tools-Credential-Storage.html +1035 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Tools-Debugging-with-Git.html +861 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Tools-Interactive-Staging.html +920 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Tools-Replace.html +949 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Tools-Rerere.html +983 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Tools-Reset-Demystified.html +1236 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Tools-Revision-Selection.html +1178 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Tools-Rewriting-History.html +1182 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Tools-Searching.html +875 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work.html +922 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Tools-Stashing-and-Cleaning.html +1039 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Tools-Submodules.html +1864 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-Tools-Summary.html +705 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-and-Other-Systems-Git-as-a-Client.html +2656 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-and-Other-Systems-Migrating-to-Git.html +1741 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-and-Other-Systems-Summary.html +703 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-on-the-Server-Generating-Your-SSH-Public-Key.html +759 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-on-the-Server-Getting-Git-on-a-Server.html +827 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-on-the-Server-Git-Daemon.html +775 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-on-the-Server-GitLab.html +872 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-on-the-Server-GitWeb.html +776 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-on-the-Server-Setting-Up-the-Server.html +870 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-on-the-Server-Smart-HTTP.html +789 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-on-the-Server-Summary.html +709 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols.html +963 -0
- data/spec/support/static/git-scm.com/book/en/v2/Git-on-the-Server-Third-Party-Hosted-Options.html +711 -0
- data/spec/support/static/git-scm.com/book/en/v2/GitHub-Account-Setup-and-Configuration.html +858 -0
- data/spec/support/static/git-scm.com/book/en/v2/GitHub-Contributing-to-a-Project.html +1502 -0
- data/spec/support/static/git-scm.com/book/en/v2/GitHub-Maintaining-a-Project.html +1218 -0
- data/spec/support/static/git-scm.com/book/en/v2/GitHub-Managing-an-organization.html +797 -0
- data/spec/support/static/git-scm.com/book/en/v2/GitHub-Scripting-GitHub.html +1059 -0
- data/spec/support/static/git-scm.com/book/en/v2/GitHub-Summary.html +704 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_abort_merge.html +1605 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_add_email_addresses.html +858 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_advanced_merging.html +1605 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_an_example_git_enforced_policy.html +1200 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_annotated_tags.html +1049 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_api_comment.html +1059 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_bare_repo.html +827 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_basic_branching.html +1102 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_basic_merge_conflicts.html +1102 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_basic_merging.html +1102 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_binary_search.html +861 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_branch_management.html +946 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_branch_references.html +1178 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_build_number.html +1354 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_bundling.html +888 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_changing_multiple.html +1182 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_checking_out_conflicts.html +1605 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_checking_out_remotes.html +1354 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_checking_status.html +1432 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_cloning_submodules.html +1864 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_commit_guidelines.html +1667 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_commit_ranges.html +1178 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_commit_status.html +1059 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_committing_changes.html +1432 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_contrib_file.html +1218 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_contributing_project.html +1667 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_create_new_branch.html +1020 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_credential_caching.html +1035 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_custom_importer.html +1741 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_data_recovery.html +1086 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_delete_branches.html +1009 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_editor.html +889 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_eg_task_lists.html +1502 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_email_hooks.html +876 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_email_notification.html +1502 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_email_notifications.html +1218 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_email_pr.html +1218 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_enforcing_commit_message_format.html +1200 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_example_markdown.html +1502 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_external_merge_tools.html +1315 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_fetch_and_push_on_different_repositories.html +1502 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_fetching_and_pulling.html +983 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_file_annotation.html +861 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_first_time.html +889 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_generate_ssh_key.html +759 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_getting_a_repo.html +816 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_getting_git_on_a_server.html +827 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_aliases.html +775 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_am.html +1354 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_amend.html +1182 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_branches_overview.html +1020 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_clean.html +1039 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_cloning.html +816 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_commit_objects.html +1209 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_config.html +1315 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_diff_staged.html +1432 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_gc.html +1086 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_grep.html +875 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_help.html +750 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_hooks.html +876 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_mv.html +1432 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_p4.html +1741 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_p4_branches.html +2656 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_reflog.html +1178 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_refs.html +939 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_reset.html +1236 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_stashing.html +1039 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_submodules.html +1864 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_svn.html +2656 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_git_tagging.html +1049 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_gitlab_groups_section.html +872 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_ignoring.html +1432 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_inspecting_remote.html +983 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_integration_manager.html +859 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_interactive_staging.html +920 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_keyword_expansion.html +1134 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_libgit2_bindings.html +1003 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_manual_remerge.html +1605 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_md_code.html +1502 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_md_drag.html +1502 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_md_emoji.html +1502 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_md_quote.html +1502 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_merge_button.html +1218 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_merge_log.html +1605 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_merge_rebase_work.html +1028 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_new_repo_dropdown.html +1218 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_not_center.html +1218 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_org_page.html +797 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_other_client_hooks.html +876 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_p4_git_fusion.html +2656 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_patches_from_email.html +1354 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_personal_avatar.html +858 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_plumbing_porcelain.html +745 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_pr_closed.html +1502 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_pr_discussion.html +1502 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_pr_fail.html +1502 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_pr_final.html +1502 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_pr_references.html +1502 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_pr_references_render.html +1502 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_pr_refs.html +1218 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_pre_merge_rebase_work.html +1028 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_preparing_release.html +1354 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_private_team.html +1667 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_project_over_email.html +1667 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_public_project.html +1667 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_publishing_submodules.html +1864 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_pushing_branches.html +1009 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_pushing_refspecs.html +872 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_pushing_remotes.html +983 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_rebase_cherry_pick.html +1354 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_rebase_peril.html +1028 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_rebase_rebase.html +1028 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_rebase_rebase_work.html +1028 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_rebasing.html +1028 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_refspec.html +872 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_remote_branches.html +1009 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_remote_repos.html +983 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_removing_file_every_commit.html +1182 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_removing_files.html +1432 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_removing_objects.html +1086 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_replace.html +949 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_reverse_commit.html +1605 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_revision_selection.html +1178 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_rewriting_history.html +1182 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_searching.html +875 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_service_config.html +1059 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_services_hooks.html +1059 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_setting_up_server.html +870 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_sharing_tags.html +1049 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_signing.html +922 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_signing_commits.html +922 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_squashing.html +1182 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_starting_submodules.html +1864 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_subtree_merge.html +1605 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_switching_branches.html +1020 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_tagging_releases.html +1354 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_task_list_progress.html +1502 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_team_page.html +797 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_the_index.html +1236 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_the_shortlog.html +1354 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_topic_branch.html +786 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_tracking_branches.html +1009 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_tracking_files.html +1432 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_tree_objects.html +1209 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_triple_dot.html +1178 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_undoing.html +998 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_unstaging.html +998 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_viewing_history.html +1172 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_web_hook.html +1059 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/_what_is_introduced.html +1354 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/ch01-getting-started.html +783 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/ch02-git-basics-chapter.html +816 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/ch03-git-branching.html +1020 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/ch05-distributed-git.html +859 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/ch06-github.html +858 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/ch06-github_flow.html +1502 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/ch10-git-internals.html +745 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/ch_core_editor.html +863 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/divergent_history.html +1020 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/double_dot.html +1178 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/filters_a.html +1134 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/filters_b.html +1134 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/limit_options.html +1172 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/log_options.html +1172 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/merwf_a.html +1354 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/merwf_b.html +1354 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/merwf_c.html +1354 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/merwf_d.html +1354 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/merwf_e.html +1354 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/merwf_f.html +1354 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/oh_my_zsh_git.html +765 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/pretty_format.html +1172 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/psp_b.html +1667 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/rbdiag_e.html +1028 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/rbdiag_g.html +1028 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/rbdiag_h.html +1028 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/rbdiag_i.html +1028 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/rebasing-merging-example.html +1028 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/ref_rerere.html +983 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/ref_the_ref.html +939 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/wfdiag_b.html +859 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/wfdiag_c.html +859 -0
- data/spec/support/static/git-scm.com/book/en/v2/ch00/what_is_git_section.html +857 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/2fa-1.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/account-settings.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/advance-master.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/advance-testing.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/areas.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/avatar-crop.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/basic-branching-1.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/basic-branching-2.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/basic-branching-3.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/basic-branching-4.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/basic-branching-5.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/basic-branching-6.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/basic-merging-1.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/basic-merging-2.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/basic-rebase-1.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/basic-rebase-2.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/basic-rebase-3.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/basic-rebase-4.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/benevolent-dictator.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/blink-01-start.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/blink-02-pr.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/blink-03-pull-request-open.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/blink-04-email.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/blink-04-pr-comment.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/blink-05-general-comment.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/blink-06-final.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/branch-and-history.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/branch_widget_mac.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/branch_widget_win.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/centralized.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/centralized_workflow.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/checkout-master.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/clean.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/collaborators.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/commit-and-tree.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/commits-and-parents.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/data-model-1.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/data-model-2.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/data-model-3.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/data-model-4.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/deltas.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/distributed.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/double-dot.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/email-settings.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/forkbutton.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/git-bash.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/git-diff-check.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/git-fusion-boot.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/git-fusion-perforce-graph.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/git-gui.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/git-instaweb.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/git-osx-installer.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/github_mac.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/github_win.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/gitk.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/gitlab-groups.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/gitlab-menu.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/gitlab-users.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/head-to-master.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/head-to-testing.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/integration-manager.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/interesting-rebase-1.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/interesting-rebase-2.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/interesting-rebase-3.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/interesting-rebase-4.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/interesting-rebase-5.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/jb.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/large-merges-1.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/large-merges-2.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/lifecycle.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/local.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/lr-branches-1.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/lr-branches-2.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/maint-01-email.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/maint-02-merge.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/maint-03-email-resp.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/maint-04-target.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/maint-05-mentions.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/maint-06-unsubscribe.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/maint-07-notifications.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/maint-08-notifications-page.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/maint-09-contrib.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/maint-10-default-branch.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/maint-11-transfer.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/managed-team-1.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/managed-team-2.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/managed-team-3.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/managed-team-flow.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/markdown-01-example.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/markdown-02-tasks.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/markdown-03-task-summary.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/markdown-04-fenced-code.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/markdown-05-quote.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/markdown-06-emoji-complete.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/markdown-07-emoji.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/markdown-08-drag-drop.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/mentions-01-syntax.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/mentions-02-render.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/mentions-03-closed.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/merging-workflows-1.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/merging-workflows-2.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/merging-workflows-3.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/merging-workflows-4.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/merging-workflows-5.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/new-repo.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/neworg.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/newrepo.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/newrepoform.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/orgs-01-page.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/orgs-02-teams.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/orgs-03-audit.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/p4merge.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/perils-of-rebasing-1.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/perils-of-rebasing-2.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/perils-of-rebasing-3.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/perils-of-rebasing-4.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/perils-of-rebasing-5.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/posh-git.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/pr-01-fail.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/pr-02-merge-fix.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/public-small-1.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/public-small-2.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/public-small-3.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/rebasing-1.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/rebasing-2.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/remote-branches-1.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/remote-branches-2.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/remote-branches-3.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/remote-branches-4.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/remote-branches-5.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/replace1.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/replace2.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/replace3.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/replace4.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/replace5.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/reposettingslink.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/rerere1.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/rerere2.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/rerere3.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/reset-checkout.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/reset-ex1.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/reset-ex2.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/reset-ex3.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/reset-ex4.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/reset-ex5.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/reset-ex6.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/reset-hard.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/reset-mixed.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/reset-path1.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/reset-path2.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/reset-path3.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/reset-soft.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/reset-squash-r1.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/reset-squash-r2.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/reset-squash-r3.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/reset-start.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/reset-workflow.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/scripting-01-services.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/scripting-02-email-service.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/scripting-03-webhook.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/scripting-04-webhook-debug.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/scripting-05-access-token.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/scripting-06-comment.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/scripting-07-status.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/signup.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/small-team-1.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/small-team-2.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/small-team-3.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/small-team-4.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/small-team-5.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/small-team-6.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/small-team-7.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/small-team-flow.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/smudge.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/snapshots.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/ssh-keys.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/topic-branches-1.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/topic-branches-2.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/two-branches.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/undomerge-reset.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/undomerge-revert.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/undomerge-revert2.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/undomerge-revert3.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/undomerge-start.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/your-profile.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/zsh-oh-my.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2/images/zsh-prompt.png +0 -0
- data/spec/support/static/git-scm.com/book/en/v2.html +688 -0
- data/spec/support/static/git-scm.com/favicon.ico +0 -0
- data/spec/support/static/git-scm.com/images/bg/body.jpg +0 -0
- data/spec/support/static/git-scm.com/images/bg/isometric-grid.png +0 -0
- data/spec/support/static/git-scm.com/images/bg/isometric-grid@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/bg/search-header.jpg +0 -0
- data/spec/support/static/git-scm.com/images/company-project-logos/android.png +0 -0
- data/spec/support/static/git-scm.com/images/company-project-logos/android@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/company-project-logos/eclipse.png +0 -0
- data/spec/support/static/git-scm.com/images/company-project-logos/eclipse@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/company-project-logos/facebook.png +0 -0
- data/spec/support/static/git-scm.com/images/company-project-logos/facebook@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/company-project-logos/gnome.png +0 -0
- data/spec/support/static/git-scm.com/images/company-project-logos/gnome@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/company-project-logos/google.png +0 -0
- data/spec/support/static/git-scm.com/images/company-project-logos/google@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/company-project-logos/kde.png +0 -0
- data/spec/support/static/git-scm.com/images/company-project-logos/kde@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/company-project-logos/linked-in.png +0 -0
- data/spec/support/static/git-scm.com/images/company-project-logos/linked-in@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/company-project-logos/linux.png +0 -0
- data/spec/support/static/git-scm.com/images/company-project-logos/linux@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/company-project-logos/microsoft.png +0 -0
- data/spec/support/static/git-scm.com/images/company-project-logos/microsoft@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/company-project-logos/netflix.png +0 -0
- data/spec/support/static/git-scm.com/images/company-project-logos/netflix@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/company-project-logos/perl.png +0 -0
- data/spec/support/static/git-scm.com/images/company-project-logos/perl@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/company-project-logos/postgresql.png +0 -0
- data/spec/support/static/git-scm.com/images/company-project-logos/postgresql@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/company-project-logos/qt.png +0 -0
- data/spec/support/static/git-scm.com/images/company-project-logos/qt@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/company-project-logos/rails.png +0 -0
- data/spec/support/static/git-scm.com/images/company-project-logos/rails@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/company-project-logos/twitter.png +0 -0
- data/spec/support/static/git-scm.com/images/company-project-logos/twitter@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/company-project-logos/x.png +0 -0
- data/spec/support/static/git-scm.com/images/company-project-logos/x@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/epub.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/admin-sm.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/admin-sm@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/apple.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/apple@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/book.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/book@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/box.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/box@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/branch-sm.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/branch-sm@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/camera-sm.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/camera-sm@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/chevron-up@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/code.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/code@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/debugging-sm.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/debugging-sm@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/document.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/document@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/download.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/email-sm.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/email-sm@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/external-sm.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/external-sm@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/gui.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/gui@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/info.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/info@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/inspection-sm.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/inspection-sm@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/linux.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/linux@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/nav-circles.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/nav-circles@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/patching-sm.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/patching-sm@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/plumbing-sm.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/plumbing-sm@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/projects-sm.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/projects-sm@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/search.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/search@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/server-admin-sm.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/server-admin-sm@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/setup-sm.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/setup-sm@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/sharing-sm.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/sharing-sm@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/sidebar.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/sidebar@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/source-code.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/source-code@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/windows.png +0 -0
- data/spec/support/static/git-scm.com/images/icons/windows@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/logo@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/mobi.png +0 -0
- data/spec/support/static/git-scm.com/images/monitor-default.png +0 -0
- data/spec/support/static/git-scm.com/images/monitor-default@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/monitor-linux.png +0 -0
- data/spec/support/static/git-scm.com/images/monitor-linux@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/monitor-mac.png +0 -0
- data/spec/support/static/git-scm.com/images/monitor-mac@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/monitor-windows.png +0 -0
- data/spec/support/static/git-scm.com/images/monitor-windows@2x.png +0 -0
- data/spec/support/static/git-scm.com/images/pdf.png +0 -0
- data/spec/support/static/git-scm.com/images/progit2.png +0 -0
- data/spec/support/static/git-scm.com/images/sidebar-divider.png +0 -0
- data/spec/support/static/git-scm.com/images/sidebar-divider@2x.png +0 -0
- data/spec/support/static/git-scm.com/robots.txt +0 -0
- data/spec/task_spec.rb +7 -0
- data/wayfarer.gemspec +2 -2
- metadata +620 -16
- data/lib/wayfarer/middleware/worker.rb +0 -50
- data/spec/factories/queue/chain.rb +0 -11
- data/spec/middleware/worker_spec.rb +0 -127
@@ -0,0 +1,1667 @@
|
|
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 - Contributing to 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="_project_over_email.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" class=active>Contributing to a Project </a>
|
345
|
+
</li>
|
346
|
+
<li>
|
347
|
+
5.3
|
348
|
+
<a href="_git_am.html" >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.2 Distributed Git - Contributing to a Project</h1>
|
675
|
+
<div>
|
676
|
+
<h2 id="_contributing_project">Contributing to a Project</h2>
|
677
|
+
<div class="paragraph">
|
678
|
+
<p>
|
679
|
+
The main difficulty with describing how to contribute to a project are the numerous variations on how to do that.
|
680
|
+
Because Git is very flexible, people can and do work together in many ways, and it’s problematic to describe how you should contribute — every project is a bit different.
|
681
|
+
Some of the variables involved are active contributor count, chosen workflow, your commit access, and possibly the external contribution method.</p>
|
682
|
+
</div>
|
683
|
+
<div class="paragraph">
|
684
|
+
<p>The first variable is active contributor count — how many users are actively contributing code to this project, and how often?
|
685
|
+
In many instances, you’ll have two or three developers with a few commits a day, or possibly less for somewhat dormant projects.
|
686
|
+
For larger companies or projects, the number of developers could be in the thousands, with hundreds or thousands of commits coming in each day.
|
687
|
+
This is important because with more and more developers, you run into more issues with making sure your code applies cleanly or can be easily merged.
|
688
|
+
Changes you submit may be rendered obsolete or severely broken by work that is merged in while you were working or while your changes were waiting to be approved or applied.
|
689
|
+
How can you keep your code consistently up to date and your commits valid?</p>
|
690
|
+
</div>
|
691
|
+
<div class="paragraph">
|
692
|
+
<p>The next variable is the workflow in use for the project.
|
693
|
+
Is it centralized, with each developer having equal write access to the main codeline?
|
694
|
+
Does the project have a maintainer or integration manager who checks all the patches?
|
695
|
+
Are all the patches peer-reviewed and approved?
|
696
|
+
Are you involved in that process?
|
697
|
+
Is a lieutenant system in place, and do you have to submit your work to them first?</p>
|
698
|
+
</div>
|
699
|
+
<div class="paragraph">
|
700
|
+
<p>The next variable is your commit access.
|
701
|
+
The workflow required in order to contribute to a project is much different if you have write access to the project than if you don’t.
|
702
|
+
If you don’t have write access, how does the project prefer to accept contributed work?
|
703
|
+
Does it even have a policy?
|
704
|
+
How much work are you contributing at a time?
|
705
|
+
How often do you contribute?</p>
|
706
|
+
</div>
|
707
|
+
<div class="paragraph">
|
708
|
+
<p>All these questions can affect how you contribute effectively to a project and what workflows are preferred or available to you.
|
709
|
+
We’ll cover aspects of each of these in a series of use cases, moving from simple to more complex; you should be able to construct the specific workflows you need in practice from these examples.</p>
|
710
|
+
</div>
|
711
|
+
<div class="sect3">
|
712
|
+
<h3 id="_commit_guidelines">Commit Guidelines</h3>
|
713
|
+
<div class="paragraph">
|
714
|
+
<p>Before we start looking at the specific use cases, here’s a quick note about commit messages.
|
715
|
+
Having a good guideline for creating commits and sticking to it makes working with Git and collaborating with others a lot easier.
|
716
|
+
The Git project provides a document that lays out a number of good tips for creating commits from which to submit patches — you can read it in the Git source code in the <code>Documentation/SubmittingPatches</code> file.</p>
|
717
|
+
</div>
|
718
|
+
<div class="paragraph">
|
719
|
+
<p>
|
720
|
+
First, your submissions should not contain any whitespace errors.
|
721
|
+
Git provides an easy way to check for this — before you commit, run <code>git diff --check</code>, which identifies possible whitespace errors and lists them for you.</p>
|
722
|
+
</div>
|
723
|
+
<div class="imageblock">
|
724
|
+
<div class="content">
|
725
|
+
<img src="../images/git-diff-check.png" alt="Output of `git diff --check`">
|
726
|
+
</div>
|
727
|
+
<div class="title">Figure 56. Output of <code>git diff --check</code>
|
728
|
+
</div>
|
729
|
+
</div>
|
730
|
+
<div class="paragraph">
|
731
|
+
<p>If you run that command before committing, you can tell if you’re about to commit whitespace issues that may annoy other developers.</p>
|
732
|
+
</div>
|
733
|
+
<div class="paragraph">
|
734
|
+
<p>Next, try to make each commit a logically separate changeset.
|
735
|
+
If you can, try to make your changes digestible — don’t code for a whole weekend on five different issues and then submit them all as one massive commit on Monday.
|
736
|
+
Even if you don’t commit during the weekend, use the staging area on Monday to split your work into at least one commit per issue, with a useful message per commit.
|
737
|
+
If some of the changes modify the same file, try to use <code>git add --patch</code> to partially stage files (covered in detail in <a href="_interactive_staging.html">Interactive Staging</a>).
|
738
|
+
The project snapshot at the tip of the branch is identical whether you do one commit or five, as long as all the changes are added at some point, so try to make things easier on your fellow developers when they have to review your changes.</p>
|
739
|
+
</div>
|
740
|
+
<div class="paragraph">
|
741
|
+
<p>This approach also makes it easier to pull out or revert one of the changesets if you need to later.
|
742
|
+
<a href="_rewriting_history.html">Rewriting History</a> describes a number of useful Git tricks for rewriting history and interactively staging files — use these tools to help craft a clean and understandable history before sending the work to someone else.</p>
|
743
|
+
</div>
|
744
|
+
<div class="paragraph">
|
745
|
+
<p>The last thing to keep in mind is the commit message.
|
746
|
+
Getting in the habit of creating quality commit messages makes using and collaborating with Git a lot easier.
|
747
|
+
As a general rule, your messages should start with a single line that’s no more than about 50 characters and that describes the changeset concisely, followed by a blank line, followed by a more detailed explanation.
|
748
|
+
The Git project requires that the more detailed explanation include your motivation for the change and contrast its implementation with previous behavior — this is a good guideline to follow.
|
749
|
+
Write your commit message in the imperative: "Fix bug" and not "Fixed bug" or "Fixes bug."
|
750
|
+
Here is a template you can follow, which we’ve lightly adapted from one <a href="https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html">originally written by Tim Pope</a>:</p>
|
751
|
+
</div>
|
752
|
+
<div class="listingblock">
|
753
|
+
<div class="content">
|
754
|
+
<pre class="highlight"><code class="language-text" data-lang="text">Capitalized, short (50 chars or less) summary
|
755
|
+
|
756
|
+
More detailed explanatory text, if necessary. Wrap it to about 72
|
757
|
+
characters or so. In some contexts, the first line is treated as the
|
758
|
+
subject of an email and the rest of the text as the body. The blank
|
759
|
+
line separating the summary from the body is critical (unless you omit
|
760
|
+
the body entirely); tools like rebase will confuse you if you run the
|
761
|
+
two together.
|
762
|
+
|
763
|
+
Write your commit message in the imperative: "Fix bug" and not "Fixed bug"
|
764
|
+
or "Fixes bug." This convention matches up with commit messages generated
|
765
|
+
by commands like git merge and git revert.
|
766
|
+
|
767
|
+
Further paragraphs come after blank lines.
|
768
|
+
|
769
|
+
- Bullet points are okay, too
|
770
|
+
|
771
|
+
- Typically a hyphen or asterisk is used for the bullet, followed by a
|
772
|
+
single space, with blank lines in between, but conventions vary here
|
773
|
+
|
774
|
+
- Use a hanging indent</code></pre>
|
775
|
+
</div>
|
776
|
+
</div>
|
777
|
+
<div class="paragraph">
|
778
|
+
<p>If all your commit messages follow this model, things will be much easier for you and the developers with whom you collaborate.
|
779
|
+
The Git project has well-formatted commit messages — try running <code>git log --no-merges</code> there to see what a nicely-formatted project-commit history looks like.</p>
|
780
|
+
</div>
|
781
|
+
<div class="admonitionblock note">
|
782
|
+
<table>
|
783
|
+
<tr>
|
784
|
+
<td class="icon">
|
785
|
+
<div class="title">Note</div>
|
786
|
+
</td>
|
787
|
+
<td class="content">
|
788
|
+
<div class="title">Do as we say, not as we do.</div>
|
789
|
+
<div class="paragraph">
|
790
|
+
<p>For the sake of brevity, many of the examples in this book don’t have nicely-formatted commit messages like this; instead, we simply use the <code>-m</code> option to <code>git commit</code>.</p>
|
791
|
+
</div>
|
792
|
+
<div class="paragraph">
|
793
|
+
<p>In short, do as we say, not as we do.</p>
|
794
|
+
</div>
|
795
|
+
</td>
|
796
|
+
</tr>
|
797
|
+
</table>
|
798
|
+
</div>
|
799
|
+
</div>
|
800
|
+
<div class="sect3">
|
801
|
+
<h3 id="_private_team">Private Small Team</h3>
|
802
|
+
<div class="paragraph">
|
803
|
+
<p>
|
804
|
+
The simplest setup you’re likely to encounter is a private project with one or two other developers.
|
805
|
+
“Private,” in this context, means closed-source — not accessible to the outside world.
|
806
|
+
You and the other developers all have push access to the repository.</p>
|
807
|
+
</div>
|
808
|
+
<div class="paragraph">
|
809
|
+
<p>In this environment, you can follow a workflow similar to what you might do when using Subversion or another centralized system.
|
810
|
+
You still get the advantages of things like offline committing and vastly simpler branching and merging, but the workflow can be very similar; the main difference is that merges happen client-side rather than on the server at commit time.
|
811
|
+
Let’s see what it might look like when two developers start to work together with a shared repository.
|
812
|
+
The first developer, John, clones the repository, makes a change, and commits locally.
|
813
|
+
The protocol messages have been replaced with <code>…</code> in these examples to shorten them somewhat.</p>
|
814
|
+
</div>
|
815
|
+
<div class="listingblock">
|
816
|
+
<div class="content">
|
817
|
+
<pre class="highlight"><code class="language-console" data-lang="console"># John's Machine
|
818
|
+
$ git clone john@githost:simplegit.git
|
819
|
+
Cloning into 'simplegit'...
|
820
|
+
...
|
821
|
+
$ cd simplegit/
|
822
|
+
$ vim lib/simplegit.rb
|
823
|
+
$ git commit -am 'Remove invalid default value'
|
824
|
+
[master 738ee87] Remove invalid default value
|
825
|
+
1 files changed, 1 insertions(+), 1 deletions(-)</code></pre>
|
826
|
+
</div>
|
827
|
+
</div>
|
828
|
+
<div class="paragraph">
|
829
|
+
<p>The second developer, Jessica, does the same thing — clones the repository and commits a change:</p>
|
830
|
+
</div>
|
831
|
+
<div class="listingblock">
|
832
|
+
<div class="content">
|
833
|
+
<pre class="highlight"><code class="language-console" data-lang="console"># Jessica's Machine
|
834
|
+
$ git clone jessica@githost:simplegit.git
|
835
|
+
Cloning into 'simplegit'...
|
836
|
+
...
|
837
|
+
$ cd simplegit/
|
838
|
+
$ vim TODO
|
839
|
+
$ git commit -am 'Add reset task'
|
840
|
+
[master fbff5bc] Add reset task
|
841
|
+
1 files changed, 1 insertions(+), 0 deletions(-)</code></pre>
|
842
|
+
</div>
|
843
|
+
</div>
|
844
|
+
<div class="paragraph">
|
845
|
+
<p>Now, Jessica pushes her work to the server, which works just fine:</p>
|
846
|
+
</div>
|
847
|
+
<div class="listingblock">
|
848
|
+
<div class="content">
|
849
|
+
<pre class="highlight"><code class="language-console" data-lang="console"># Jessica's Machine
|
850
|
+
$ git push origin master
|
851
|
+
...
|
852
|
+
To jessica@githost:simplegit.git
|
853
|
+
1edee6b..fbff5bc master -> master</code></pre>
|
854
|
+
</div>
|
855
|
+
</div>
|
856
|
+
<div class="paragraph">
|
857
|
+
<p>The last line of the output above shows a useful return message from the push operation.
|
858
|
+
The basic format is <code><oldref>..<newref> fromref → toref</code>, where <code>oldref</code> means the old reference, <code>newref</code> means the new reference, <code>fromref</code> is the name of the local reference being pushed, and <code>toref</code> is the name of the remote reference being updated.
|
859
|
+
You’ll see similar output like this below in the discussions, so having a basic idea of the meaning will help in understanding the various states of the repositories.
|
860
|
+
More details are available in the documentation for <a href="https://git-scm.com/docs/git-push">git-push</a>.</p>
|
861
|
+
</div>
|
862
|
+
<div class="paragraph">
|
863
|
+
<p>Continuing with this example, shortly afterwards, John makes some changes, commits them to his local repository, and tries to push them to the same server:</p>
|
864
|
+
</div>
|
865
|
+
<div class="listingblock">
|
866
|
+
<div class="content">
|
867
|
+
<pre class="highlight"><code class="language-console" data-lang="console"># John's Machine
|
868
|
+
$ git push origin master
|
869
|
+
To john@githost:simplegit.git
|
870
|
+
! [rejected] master -> master (non-fast forward)
|
871
|
+
error: failed to push some refs to 'john@githost:simplegit.git'</code></pre>
|
872
|
+
</div>
|
873
|
+
</div>
|
874
|
+
<div class="paragraph">
|
875
|
+
<p>In this case, John’s push fails because of Jessica’s earlier push of <em>her</em> changes.
|
876
|
+
This is especially important to understand if you’re used to Subversion, because you’ll notice that the two developers didn’t edit the same file.
|
877
|
+
Although Subversion automatically does such a merge on the server if different files are edited, with Git, you must <em>first</em> merge the commits locally.
|
878
|
+
In other words, John must first fetch Jessica’s upstream changes and merge them into his local repository before he will be allowed to push.</p>
|
879
|
+
</div>
|
880
|
+
<div class="paragraph">
|
881
|
+
<p>As a first step, John fetches Jessica’s work (this only <em>fetches</em> Jessica’s upstream work, it does not yet merge it into John’s work):</p>
|
882
|
+
</div>
|
883
|
+
<div class="listingblock">
|
884
|
+
<div class="content">
|
885
|
+
<pre class="highlight"><code class="language-console" data-lang="console">$ git fetch origin
|
886
|
+
...
|
887
|
+
From john@githost:simplegit
|
888
|
+
+ 049d078...fbff5bc master -> origin/master</code></pre>
|
889
|
+
</div>
|
890
|
+
</div>
|
891
|
+
<div class="paragraph">
|
892
|
+
<p>At this point, John’s local repository looks something like this:</p>
|
893
|
+
</div>
|
894
|
+
<div class="imageblock">
|
895
|
+
<div class="content">
|
896
|
+
<img src="../images/small-team-1.png" alt="John’s divergent history">
|
897
|
+
</div>
|
898
|
+
<div class="title">Figure 57. John’s divergent history</div>
|
899
|
+
</div>
|
900
|
+
<div class="paragraph">
|
901
|
+
<p>Now John can merge Jessica’s work that he fetched into his own local work:</p>
|
902
|
+
</div>
|
903
|
+
<div class="listingblock">
|
904
|
+
<div class="content">
|
905
|
+
<pre class="highlight"><code class="language-console" data-lang="console">$ git merge origin/master
|
906
|
+
Merge made by the 'recursive' strategy.
|
907
|
+
TODO | 1 +
|
908
|
+
1 files changed, 1 insertions(+), 0 deletions(-)</code></pre>
|
909
|
+
</div>
|
910
|
+
</div>
|
911
|
+
<div class="paragraph">
|
912
|
+
<p>As long as that local merge goes smoothly, John’s updated history will now look like this:</p>
|
913
|
+
</div>
|
914
|
+
<div class="imageblock">
|
915
|
+
<div class="content">
|
916
|
+
<img src="../images/small-team-2.png" alt="John’s repository after merging `origin/master`">
|
917
|
+
</div>
|
918
|
+
<div class="title">Figure 58. John’s repository after merging <code>origin/master</code>
|
919
|
+
</div>
|
920
|
+
</div>
|
921
|
+
<div class="paragraph">
|
922
|
+
<p>At this point, John might want to test this new code to make sure none of Jessica’s work affects any of his and, as long as everything seems fine, he can finally push the new merged work up to the server:</p>
|
923
|
+
</div>
|
924
|
+
<div class="listingblock">
|
925
|
+
<div class="content">
|
926
|
+
<pre class="highlight"><code class="language-console" data-lang="console">$ git push origin master
|
927
|
+
...
|
928
|
+
To john@githost:simplegit.git
|
929
|
+
fbff5bc..72bbc59 master -> master</code></pre>
|
930
|
+
</div>
|
931
|
+
</div>
|
932
|
+
<div class="paragraph">
|
933
|
+
<p>In the end, John’s commit history will look like this:</p>
|
934
|
+
</div>
|
935
|
+
<div class="imageblock">
|
936
|
+
<div class="content">
|
937
|
+
<img src="../images/small-team-3.png" alt="John’s history after pushing to the `origin` server">
|
938
|
+
</div>
|
939
|
+
<div class="title">Figure 59. John’s history after pushing to the <code>origin</code> server</div>
|
940
|
+
</div>
|
941
|
+
<div class="paragraph">
|
942
|
+
<p>In the meantime, Jessica has created a new topic branch called <code>issue54</code>, and made three commits to that branch.
|
943
|
+
She hasn’t fetched John’s changes yet, so her commit history looks like this:</p>
|
944
|
+
</div>
|
945
|
+
<div class="imageblock">
|
946
|
+
<div class="content">
|
947
|
+
<img src="../images/small-team-4.png" alt="Jessica’s topic branch">
|
948
|
+
</div>
|
949
|
+
<div class="title">Figure 60. Jessica’s topic branch</div>
|
950
|
+
</div>
|
951
|
+
<div class="paragraph">
|
952
|
+
<p>Suddenly, Jessica learns that John has pushed some new work to the server and she wants to take a look at it, so she can fetch all new content from the server that she does not yet have with:</p>
|
953
|
+
</div>
|
954
|
+
<div class="listingblock">
|
955
|
+
<div class="content">
|
956
|
+
<pre class="highlight"><code class="language-console" data-lang="console"># Jessica's Machine
|
957
|
+
$ git fetch origin
|
958
|
+
...
|
959
|
+
From jessica@githost:simplegit
|
960
|
+
fbff5bc..72bbc59 master -> origin/master</code></pre>
|
961
|
+
</div>
|
962
|
+
</div>
|
963
|
+
<div class="paragraph">
|
964
|
+
<p>That pulls down the work John has pushed up in the meantime.
|
965
|
+
Jessica’s history now looks like this:</p>
|
966
|
+
</div>
|
967
|
+
<div class="imageblock">
|
968
|
+
<div class="content">
|
969
|
+
<img src="../images/small-team-5.png" alt="Jessica’s history after fetching John’s changes">
|
970
|
+
</div>
|
971
|
+
<div class="title">Figure 61. Jessica’s history after fetching John’s changes</div>
|
972
|
+
</div>
|
973
|
+
<div class="paragraph">
|
974
|
+
<p>Jessica thinks her topic branch is ready, but she wants to know what part of John’s fetched work she has to merge into her work so that she can push.
|
975
|
+
She runs <code>git log</code> to find out:</p>
|
976
|
+
</div>
|
977
|
+
<div class="listingblock">
|
978
|
+
<div class="content">
|
979
|
+
<pre class="highlight"><code class="language-console" data-lang="console">$ git log --no-merges issue54..origin/master
|
980
|
+
commit 738ee872852dfaa9d6634e0dea7a324040193016
|
981
|
+
Author: John Smith <jsmith@example.com>
|
982
|
+
Date: Fri May 29 16:01:27 2009 -0700
|
983
|
+
|
984
|
+
Remove invalid default value</code></pre>
|
985
|
+
</div>
|
986
|
+
</div>
|
987
|
+
<div class="paragraph">
|
988
|
+
<p>The <code>issue54..origin/master</code> syntax is a log filter that asks Git to display only those commits that are on the latter branch (in this case <code>origin/master</code>) that are not on the first branch (in this case <code>issue54</code>).
|
989
|
+
We’ll go over this syntax in detail in <a href="_commit_ranges.html">Commit Ranges</a>.</p>
|
990
|
+
</div>
|
991
|
+
<div class="paragraph">
|
992
|
+
<p>From the above output, we can see that there is a single commit that John has made that Jessica has not merged into her local work.
|
993
|
+
If she merges <code>origin/master</code>, that is the single commit that will modify her local work.</p>
|
994
|
+
</div>
|
995
|
+
<div class="paragraph">
|
996
|
+
<p>Now, Jessica can merge her topic work into her <code>master</code> branch, merge John’s work (<code>origin/master</code>) into her <code>master</code> branch, and then push back to the server again.</p>
|
997
|
+
</div>
|
998
|
+
<div class="paragraph">
|
999
|
+
<p>First (having committed all of the work on her <code>issue54</code> topic branch), Jessica switches back to her <code>master</code> branch in preparation for integrating all this work:</p>
|
1000
|
+
</div>
|
1001
|
+
<div class="listingblock">
|
1002
|
+
<div class="content">
|
1003
|
+
<pre class="highlight"><code class="language-console" data-lang="console">$ git checkout master
|
1004
|
+
Switched to branch 'master'
|
1005
|
+
Your branch is behind 'origin/master' by 2 commits, and can be fast-forwarded.</code></pre>
|
1006
|
+
</div>
|
1007
|
+
</div>
|
1008
|
+
<div class="paragraph">
|
1009
|
+
<p>Jessica can merge either <code>origin/master</code> or <code>issue54</code> first — they’re both upstream, so the order doesn’t matter.
|
1010
|
+
The end snapshot should be identical no matter which order she chooses; only the history will be different.
|
1011
|
+
She chooses to merge the <code>issue54</code> branch first:</p>
|
1012
|
+
</div>
|
1013
|
+
<div class="listingblock">
|
1014
|
+
<div class="content">
|
1015
|
+
<pre class="highlight"><code class="language-console" data-lang="console">$ git merge issue54
|
1016
|
+
Updating fbff5bc..4af4298
|
1017
|
+
Fast forward
|
1018
|
+
README | 1 +
|
1019
|
+
lib/simplegit.rb | 6 +++++-
|
1020
|
+
2 files changed, 6 insertions(+), 1 deletions(-)</code></pre>
|
1021
|
+
</div>
|
1022
|
+
</div>
|
1023
|
+
<div class="paragraph">
|
1024
|
+
<p>No problems occur; as you can see it was a simple fast-forward merge.
|
1025
|
+
Jessica now completes the local merging process by merging John’s earlier fetched work that is sitting in the <code>origin/master</code> branch:</p>
|
1026
|
+
</div>
|
1027
|
+
<div class="listingblock">
|
1028
|
+
<div class="content">
|
1029
|
+
<pre class="highlight"><code class="language-console" data-lang="console">$ git merge origin/master
|
1030
|
+
Auto-merging lib/simplegit.rb
|
1031
|
+
Merge made by the 'recursive' strategy.
|
1032
|
+
lib/simplegit.rb | 2 +-
|
1033
|
+
1 files changed, 1 insertions(+), 1 deletions(-)</code></pre>
|
1034
|
+
</div>
|
1035
|
+
</div>
|
1036
|
+
<div class="paragraph">
|
1037
|
+
<p>Everything merges cleanly, and Jessica’s history now looks like this:</p>
|
1038
|
+
</div>
|
1039
|
+
<div class="imageblock">
|
1040
|
+
<div class="content">
|
1041
|
+
<img src="../images/small-team-6.png" alt="Jessica’s history after merging John’s changes">
|
1042
|
+
</div>
|
1043
|
+
<div class="title">Figure 62. Jessica’s history after merging John’s changes</div>
|
1044
|
+
</div>
|
1045
|
+
<div class="paragraph">
|
1046
|
+
<p>Now <code>origin/master</code> is reachable from Jessica’s <code>master</code> branch, so she should be able to successfully push (assuming John hasn’t pushed even more changes in the meantime):</p>
|
1047
|
+
</div>
|
1048
|
+
<div class="listingblock">
|
1049
|
+
<div class="content">
|
1050
|
+
<pre class="highlight"><code class="language-console" data-lang="console">$ git push origin master
|
1051
|
+
...
|
1052
|
+
To jessica@githost:simplegit.git
|
1053
|
+
72bbc59..8059c15 master -> master</code></pre>
|
1054
|
+
</div>
|
1055
|
+
</div>
|
1056
|
+
<div class="paragraph">
|
1057
|
+
<p>Each developer has committed a few times and merged each other’s work successfully.</p>
|
1058
|
+
</div>
|
1059
|
+
<div class="imageblock">
|
1060
|
+
<div class="content">
|
1061
|
+
<img src="../images/small-team-7.png" alt="Jessica’s history after pushing all changes back to the server">
|
1062
|
+
</div>
|
1063
|
+
<div class="title">Figure 63. Jessica’s history after pushing all changes back to the server</div>
|
1064
|
+
</div>
|
1065
|
+
<div class="paragraph">
|
1066
|
+
<p>That is one of the simplest workflows.
|
1067
|
+
You work for a while (generally in a topic branch), and merge that work into your <code>master</code> branch when it’s ready to be integrated.
|
1068
|
+
When you want to share that work, you fetch and merge your <code>master</code> from <code>origin/master</code> if it has changed, and finally push to the <code>master</code> branch on the server.
|
1069
|
+
The general sequence is something like this:</p>
|
1070
|
+
</div>
|
1071
|
+
<div class="imageblock">
|
1072
|
+
<div class="content">
|
1073
|
+
<img src="../images/small-team-flow.png" alt="General sequence of events for a simple multiple-developer Git workflow">
|
1074
|
+
</div>
|
1075
|
+
<div class="title">Figure 64. General sequence of events for a simple multiple-developer Git workflow</div>
|
1076
|
+
</div>
|
1077
|
+
</div>
|
1078
|
+
<div class="sect3">
|
1079
|
+
<h3 id="_private_managed_team">Private Managed Team</h3>
|
1080
|
+
<div class="paragraph">
|
1081
|
+
<p>
|
1082
|
+
In this next scenario, you’ll look at contributor roles in a larger private group.
|
1083
|
+
You’ll learn how to work in an environment where small groups collaborate on features, after which those team-based contributions are integrated by another party.</p>
|
1084
|
+
</div>
|
1085
|
+
<div class="paragraph">
|
1086
|
+
<p>Let’s say that John and Jessica are working together on one feature (call this “featureA”), while Jessica and a third developer, Josie, are working on a second (say, “featureB”).
|
1087
|
+
In this case, the company is using a type of integration-manager workflow where the work of the individual groups is integrated only by certain engineers, and the <code>master</code> branch of the main repo can be updated only by those engineers.
|
1088
|
+
In this scenario, all work is done in team-based branches and pulled together by the integrators later.</p>
|
1089
|
+
</div>
|
1090
|
+
<div class="paragraph">
|
1091
|
+
<p>Let’s follow Jessica’s workflow as she works on her two features, collaborating in parallel with two different developers in this environment.
|
1092
|
+
Assuming she already has her repository cloned, she decides to work on <code>featureA</code> first.
|
1093
|
+
She creates a new branch for the feature and does some work on it there:</p>
|
1094
|
+
</div>
|
1095
|
+
<div class="listingblock">
|
1096
|
+
<div class="content">
|
1097
|
+
<pre class="highlight"><code class="language-console" data-lang="console"># Jessica's Machine
|
1098
|
+
$ git checkout -b featureA
|
1099
|
+
Switched to a new branch 'featureA'
|
1100
|
+
$ vim lib/simplegit.rb
|
1101
|
+
$ git commit -am 'Add limit to log function'
|
1102
|
+
[featureA 3300904] Add limit to log function
|
1103
|
+
1 files changed, 1 insertions(+), 1 deletions(-)</code></pre>
|
1104
|
+
</div>
|
1105
|
+
</div>
|
1106
|
+
<div class="paragraph">
|
1107
|
+
<p>At this point, she needs to share her work with John, so she pushes her <code>featureA</code> branch commits up to the server.
|
1108
|
+
Jessica doesn’t have push access to the <code>master</code> branch — only the integrators do — so she has to push to another branch in order to collaborate with John:</p>
|
1109
|
+
</div>
|
1110
|
+
<div class="listingblock">
|
1111
|
+
<div class="content">
|
1112
|
+
<pre class="highlight"><code class="language-console" data-lang="console">$ git push -u origin featureA
|
1113
|
+
...
|
1114
|
+
To jessica@githost:simplegit.git
|
1115
|
+
* [new branch] featureA -> featureA</code></pre>
|
1116
|
+
</div>
|
1117
|
+
</div>
|
1118
|
+
<div class="paragraph">
|
1119
|
+
<p>Jessica emails John to tell him that she’s pushed some work into a branch named <code>featureA</code> and he can look at it now.
|
1120
|
+
While she waits for feedback from John, Jessica decides to start working on <code>featureB</code> with Josie.
|
1121
|
+
To begin, she starts a new feature branch, basing it off the server’s <code>master</code> branch:</p>
|
1122
|
+
</div>
|
1123
|
+
<div class="listingblock">
|
1124
|
+
<div class="content">
|
1125
|
+
<pre class="highlight"><code class="language-console" data-lang="console"># Jessica's Machine
|
1126
|
+
$ git fetch origin
|
1127
|
+
$ git checkout -b featureB origin/master
|
1128
|
+
Switched to a new branch 'featureB'</code></pre>
|
1129
|
+
</div>
|
1130
|
+
</div>
|
1131
|
+
<div class="paragraph">
|
1132
|
+
<p>Now, Jessica makes a couple of commits on the <code>featureB</code> branch:</p>
|
1133
|
+
</div>
|
1134
|
+
<div class="listingblock">
|
1135
|
+
<div class="content">
|
1136
|
+
<pre class="highlight"><code class="language-console" data-lang="console">$ vim lib/simplegit.rb
|
1137
|
+
$ git commit -am 'Make ls-tree function recursive'
|
1138
|
+
[featureB e5b0fdc] Make ls-tree function recursive
|
1139
|
+
1 files changed, 1 insertions(+), 1 deletions(-)
|
1140
|
+
$ vim lib/simplegit.rb
|
1141
|
+
$ git commit -am 'Add ls-files'
|
1142
|
+
[featureB 8512791] Add ls-files
|
1143
|
+
1 files changed, 5 insertions(+), 0 deletions(-)</code></pre>
|
1144
|
+
</div>
|
1145
|
+
</div>
|
1146
|
+
<div class="paragraph">
|
1147
|
+
<p>Jessica’s repository now looks like this:</p>
|
1148
|
+
</div>
|
1149
|
+
<div class="imageblock">
|
1150
|
+
<div class="content">
|
1151
|
+
<img src="../images/managed-team-1.png" alt="Jessica’s initial commit history">
|
1152
|
+
</div>
|
1153
|
+
<div class="title">Figure 65. Jessica’s initial commit history</div>
|
1154
|
+
</div>
|
1155
|
+
<div class="paragraph">
|
1156
|
+
<p>She’s ready to push her work, but gets an email from Josie that a branch with some initial “featureB” work on it was already pushed to the server as the <code>featureBee</code> branch.
|
1157
|
+
Jessica needs to merge those changes with her own before she can push her work to the server.
|
1158
|
+
Jessica first fetches Josie’s changes with <code>git fetch</code>:</p>
|
1159
|
+
</div>
|
1160
|
+
<div class="listingblock">
|
1161
|
+
<div class="content">
|
1162
|
+
<pre class="highlight"><code class="language-console" data-lang="console">$ git fetch origin
|
1163
|
+
...
|
1164
|
+
From jessica@githost:simplegit
|
1165
|
+
* [new branch] featureBee -> origin/featureBee</code></pre>
|
1166
|
+
</div>
|
1167
|
+
</div>
|
1168
|
+
<div class="paragraph">
|
1169
|
+
<p>Assuming Jessica is still on her checked-out <code>featureB</code> branch, she can now merge Josie’s work into that branch with <code>git merge</code>:</p>
|
1170
|
+
</div>
|
1171
|
+
<div class="listingblock">
|
1172
|
+
<div class="content">
|
1173
|
+
<pre class="highlight"><code class="language-console" data-lang="console">$ git merge origin/featureBee
|
1174
|
+
Auto-merging lib/simplegit.rb
|
1175
|
+
Merge made by the 'recursive' strategy.
|
1176
|
+
lib/simplegit.rb | 4 ++++
|
1177
|
+
1 files changed, 4 insertions(+), 0 deletions(-)</code></pre>
|
1178
|
+
</div>
|
1179
|
+
</div>
|
1180
|
+
<div class="paragraph">
|
1181
|
+
<p>At this point, Jessica wants to push all of this merged “featureB” work back to the server, but she doesn’t want to simply push her own <code>featureB</code> branch.
|
1182
|
+
Rather, since Josie has already started an upstream <code>featureBee</code> branch, Jessica wants to push to <em>that</em> branch, which she does with:</p>
|
1183
|
+
</div>
|
1184
|
+
<div class="listingblock">
|
1185
|
+
<div class="content">
|
1186
|
+
<pre class="highlight"><code class="language-console" data-lang="console">$ git push -u origin featureB:featureBee
|
1187
|
+
...
|
1188
|
+
To jessica@githost:simplegit.git
|
1189
|
+
fba9af8..cd685d1 featureB -> featureBee</code></pre>
|
1190
|
+
</div>
|
1191
|
+
</div>
|
1192
|
+
<div class="paragraph">
|
1193
|
+
<p>This is called a <em>refspec</em>.
|
1194
|
+
See <a href="_refspec.html">The Refspec</a> for a more detailed discussion of Git refspecs and different things you can do with them.
|
1195
|
+
Also notice the <code>-u</code> flag; this is short for <code>--set-upstream</code>, which configures the branches for easier pushing and pulling later.</p>
|
1196
|
+
</div>
|
1197
|
+
<div class="paragraph">
|
1198
|
+
<p>Suddenly, Jessica gets email from John, who tells her he’s pushed some changes to the <code>featureA</code> branch on which they are collaborating, and he asks Jessica to take a look at them.
|
1199
|
+
Again, Jessica runs a simple <code>git fetch</code> to fetch <em>all</em> new content from the server, including (of course) John’s latest work:</p>
|
1200
|
+
</div>
|
1201
|
+
<div class="listingblock">
|
1202
|
+
<div class="content">
|
1203
|
+
<pre class="highlight"><code class="language-console" data-lang="console">$ git fetch origin
|
1204
|
+
...
|
1205
|
+
From jessica@githost:simplegit
|
1206
|
+
3300904..aad881d featureA -> origin/featureA</code></pre>
|
1207
|
+
</div>
|
1208
|
+
</div>
|
1209
|
+
<div class="paragraph">
|
1210
|
+
<p>Jessica can display the log of John’s new work by comparing the content of the newly-fetched <code>featureA</code> branch with her local copy of the same branch:</p>
|
1211
|
+
</div>
|
1212
|
+
<div class="listingblock">
|
1213
|
+
<div class="content">
|
1214
|
+
<pre class="highlight"><code class="language-console" data-lang="console">$ git log featureA..origin/featureA
|
1215
|
+
commit aad881d154acdaeb2b6b18ea0e827ed8a6d671e6
|
1216
|
+
Author: John Smith <jsmith@example.com>
|
1217
|
+
Date: Fri May 29 19:57:33 2009 -0700
|
1218
|
+
|
1219
|
+
Increase log output to 30 from 25</code></pre>
|
1220
|
+
</div>
|
1221
|
+
</div>
|
1222
|
+
<div class="paragraph">
|
1223
|
+
<p>If Jessica likes what she sees, she can merge John’s new work into her local <code>featureA</code> branch with:</p>
|
1224
|
+
</div>
|
1225
|
+
<div class="listingblock">
|
1226
|
+
<div class="content">
|
1227
|
+
<pre class="highlight"><code class="language-console" data-lang="console">$ git checkout featureA
|
1228
|
+
Switched to branch 'featureA'
|
1229
|
+
$ git merge origin/featureA
|
1230
|
+
Updating 3300904..aad881d
|
1231
|
+
Fast forward
|
1232
|
+
lib/simplegit.rb | 10 +++++++++-
|
1233
|
+
1 files changed, 9 insertions(+), 1 deletions(-)</code></pre>
|
1234
|
+
</div>
|
1235
|
+
</div>
|
1236
|
+
<div class="paragraph">
|
1237
|
+
<p>Finally, Jessica might want to make a couple minor changes to all that merged content, so she is free to make those changes, commit them to her local <code>featureA</code> branch, and push the end result back to the server:</p>
|
1238
|
+
</div>
|
1239
|
+
<div class="listingblock">
|
1240
|
+
<div class="content">
|
1241
|
+
<pre class="highlight"><code class="language-console" data-lang="console">$ git commit -am 'Add small tweak to merged content'
|
1242
|
+
[featureA 774b3ed] Add small tweak to merged content
|
1243
|
+
1 files changed, 1 insertions(+), 1 deletions(-)
|
1244
|
+
$ git push
|
1245
|
+
...
|
1246
|
+
To jessica@githost:simplegit.git
|
1247
|
+
3300904..774b3ed featureA -> featureA</code></pre>
|
1248
|
+
</div>
|
1249
|
+
</div>
|
1250
|
+
<div class="paragraph">
|
1251
|
+
<p>Jessica’s commit history now looks something like this:</p>
|
1252
|
+
</div>
|
1253
|
+
<div class="imageblock">
|
1254
|
+
<div class="content">
|
1255
|
+
<img src="../images/managed-team-2.png" alt="Jessica’s history after committing on a feature branch">
|
1256
|
+
</div>
|
1257
|
+
<div class="title">Figure 66. Jessica’s history after committing on a feature branch</div>
|
1258
|
+
</div>
|
1259
|
+
<div class="paragraph">
|
1260
|
+
<p>At some point, Jessica, Josie, and John inform the integrators that the <code>featureA</code> and <code>featureBee</code> branches on the server are ready for integration into the mainline.
|
1261
|
+
After the integrators merge these branches into the mainline, a fetch will bring down the new merge commit, making the history look like this:</p>
|
1262
|
+
</div>
|
1263
|
+
<div class="imageblock">
|
1264
|
+
<div class="content">
|
1265
|
+
<img src="../images/managed-team-3.png" alt="Jessica’s history after merging both her topic branches">
|
1266
|
+
</div>
|
1267
|
+
<div class="title">Figure 67. Jessica’s history after merging both her topic branches</div>
|
1268
|
+
</div>
|
1269
|
+
<div class="paragraph">
|
1270
|
+
<p>Many groups switch to Git because of this ability to have multiple teams working in parallel, merging the different lines of work late in the process.
|
1271
|
+
The ability of smaller subgroups of a team to collaborate via remote branches without necessarily having to involve or impede the entire team is a huge benefit of Git.
|
1272
|
+
The sequence for the workflow you saw here is something like this:</p>
|
1273
|
+
</div>
|
1274
|
+
<div class="imageblock">
|
1275
|
+
<div class="content">
|
1276
|
+
<img src="../images/managed-team-flow.png" alt="Basic sequence of this managed-team workflow">
|
1277
|
+
</div>
|
1278
|
+
<div class="title">Figure 68. Basic sequence of this managed-team workflow</div>
|
1279
|
+
</div>
|
1280
|
+
</div>
|
1281
|
+
<div class="sect3">
|
1282
|
+
<h3 id="_public_project">Forked Public Project</h3>
|
1283
|
+
<div class="paragraph">
|
1284
|
+
<p>
|
1285
|
+
Contributing to public projects is a bit different.
|
1286
|
+
Because you don’t have the permissions to directly update branches on the project, you have to get the work to the maintainers some other way.
|
1287
|
+
This first example describes contributing via forking on Git hosts that support easy forking.
|
1288
|
+
Many hosting sites support this (including GitHub, BitBucket, repo.or.cz, and others), and many project maintainers expect this style of contribution.
|
1289
|
+
The next section deals with projects that prefer to accept contributed patches via email.</p>
|
1290
|
+
</div>
|
1291
|
+
<div class="paragraph">
|
1292
|
+
<p>First, you’ll probably want to clone the main repository, create a topic branch for the patch or patch series you’re planning to contribute, and do your work there.
|
1293
|
+
The sequence looks basically like this:</p>
|
1294
|
+
</div>
|
1295
|
+
<div class="listingblock">
|
1296
|
+
<div class="content">
|
1297
|
+
<pre class="highlight"><code class="language-console" data-lang="console">$ git clone <url>
|
1298
|
+
$ cd project
|
1299
|
+
$ git checkout -b featureA
|
1300
|
+
... work ...
|
1301
|
+
$ git commit
|
1302
|
+
... work ...
|
1303
|
+
$ git commit</code></pre>
|
1304
|
+
</div>
|
1305
|
+
</div>
|
1306
|
+
<div class="admonitionblock note">
|
1307
|
+
<table>
|
1308
|
+
<tr>
|
1309
|
+
<td class="icon">
|
1310
|
+
<div class="title">Note</div>
|
1311
|
+
</td>
|
1312
|
+
<td class="content">
|
1313
|
+
<div class="paragraph">
|
1314
|
+
<p>You may want to use <code>rebase -i</code> to squash your work down to a single commit, or rearrange the work in the commits to make the patch easier for the maintainer to review — see <a href="_rewriting_history.html">Rewriting History</a> for more information about interactive rebasing.</p>
|
1315
|
+
</div>
|
1316
|
+
</td>
|
1317
|
+
</tr>
|
1318
|
+
</table>
|
1319
|
+
</div>
|
1320
|
+
<div class="paragraph">
|
1321
|
+
<p>When your branch work is finished and you’re ready to contribute it back to the maintainers, go to the original project page and click the “Fork” button, creating your own writable fork of the project.
|
1322
|
+
You then need to add this repository URL as a new remote of your local repository; in this example, let’s call it <code>myfork</code>:</p>
|
1323
|
+
</div>
|
1324
|
+
<div class="listingblock">
|
1325
|
+
<div class="content">
|
1326
|
+
<pre class="highlight"><code class="language-console" data-lang="console">$ git remote add myfork <url></code></pre>
|
1327
|
+
</div>
|
1328
|
+
</div>
|
1329
|
+
<div class="paragraph">
|
1330
|
+
<p>You then need to push your new work to this repository.
|
1331
|
+
It’s easiest to push the topic branch you’re working on to your forked repository, rather than merging that work into your <code>master</code> branch and pushing that.
|
1332
|
+
The reason is that if your work isn’t accepted or is cherry-picked, you don’t have to rewind your <code>master</code> branch (the Git <code>cherry-pick</code> operation is covered in more detail in <a href="_rebase_cherry_pick.html">Rebasing and Cherry-Picking Workflows</a>).
|
1333
|
+
If the maintainers <code>merge</code>, <code>rebase</code>, or <code>cherry-pick</code> your work, you’ll eventually get it back via pulling from their repository anyhow.</p>
|
1334
|
+
</div>
|
1335
|
+
<div class="paragraph">
|
1336
|
+
<p>In any event, you can push your work with:</p>
|
1337
|
+
</div>
|
1338
|
+
<div class="listingblock">
|
1339
|
+
<div class="content">
|
1340
|
+
<pre class="highlight"><code class="language-console" data-lang="console">$ git push -u myfork featureA</code></pre>
|
1341
|
+
</div>
|
1342
|
+
</div>
|
1343
|
+
<div class="paragraph">
|
1344
|
+
<p>
|
1345
|
+
Once your work has been pushed to your fork of the repository, you need to notify the maintainers of the original project that you have work you’d like them to merge.
|
1346
|
+
This is often called a <em>pull request</em>, and you typically generate such a request either via the website — GitHub has its own “Pull Request” mechanism that we’ll go over in <a href="ch06-github.html">GitHub</a> — or you can run the <code>git request-pull</code> command and email the subsequent output to the project maintainer manually.</p>
|
1347
|
+
</div>
|
1348
|
+
<div class="paragraph">
|
1349
|
+
<p>The <code>git request-pull</code> command takes the base branch into which you want your topic branch pulled and the Git repository URL you want them to pull from, and produces a summary of all the changes you’re asking to be pulled.
|
1350
|
+
For instance, if Jessica wants to send John a pull request, and she’s done two commits on the topic branch she just pushed, she can run this:</p>
|
1351
|
+
</div>
|
1352
|
+
<div class="listingblock">
|
1353
|
+
<div class="content">
|
1354
|
+
<pre class="highlight"><code class="language-console" data-lang="console">$ git request-pull origin/master myfork
|
1355
|
+
The following changes since commit 1edee6b1d61823a2de3b09c160d7080b8d1b3a40:
|
1356
|
+
Jessica Smith (1):
|
1357
|
+
Create new function
|
1358
|
+
|
1359
|
+
are available in the git repository at:
|
1360
|
+
|
1361
|
+
git://githost/simplegit.git featureA
|
1362
|
+
|
1363
|
+
Jessica Smith (2):
|
1364
|
+
Add limit to log function
|
1365
|
+
Increase log output to 30 from 25
|
1366
|
+
|
1367
|
+
lib/simplegit.rb | 10 +++++++++-
|
1368
|
+
1 files changed, 9 insertions(+), 1 deletions(-)</code></pre>
|
1369
|
+
</div>
|
1370
|
+
</div>
|
1371
|
+
<div class="paragraph">
|
1372
|
+
<p>This output can be sent to the maintainer — it tells them where the work was branched from, summarizes the commits, and identifies from where the new work is to be pulled.</p>
|
1373
|
+
</div>
|
1374
|
+
<div class="paragraph">
|
1375
|
+
<p>On a project for which you’re not the maintainer, it’s generally easier to have a branch like <code>master</code> always track <code>origin/master</code> and to do your work in topic branches that you can easily discard if they’re rejected.
|
1376
|
+
Having work themes isolated into topic branches also makes it easier for you to rebase your work if the tip of the main repository has moved in the meantime and your commits no longer apply cleanly.
|
1377
|
+
For example, if you want to submit a second topic of work to the project, don’t continue working on the topic branch you just pushed up — start over from the main repository’s <code>master</code> branch:</p>
|
1378
|
+
</div>
|
1379
|
+
<div class="listingblock">
|
1380
|
+
<div class="content">
|
1381
|
+
<pre class="highlight"><code class="language-console" data-lang="console">$ git checkout -b featureB origin/master
|
1382
|
+
... work ...
|
1383
|
+
$ git commit
|
1384
|
+
$ git push myfork featureB
|
1385
|
+
$ git request-pull origin/master myfork
|
1386
|
+
... email generated request pull to maintainer ...
|
1387
|
+
$ git fetch origin</code></pre>
|
1388
|
+
</div>
|
1389
|
+
</div>
|
1390
|
+
<div class="paragraph">
|
1391
|
+
<p>Now, each of your topics is contained within a silo — similar to a patch queue — that you can rewrite, rebase, and modify without the topics interfering or interdepending on each other, like so:</p>
|
1392
|
+
</div>
|
1393
|
+
<div class="imageblock">
|
1394
|
+
<div class="content">
|
1395
|
+
<img src="../images/public-small-1.png" alt="Initial commit history with `featureB` work">
|
1396
|
+
</div>
|
1397
|
+
<div class="title">Figure 69. Initial commit history with <code>featureB</code> work</div>
|
1398
|
+
</div>
|
1399
|
+
<div class="paragraph">
|
1400
|
+
<p>Let’s say the project maintainer has pulled in a bunch of other patches and tried your first branch, but it no longer cleanly merges.
|
1401
|
+
In this case, you can try to rebase that branch on top of <code>origin/master</code>, resolve the conflicts for the maintainer, and then resubmit your changes:</p>
|
1402
|
+
</div>
|
1403
|
+
<div class="listingblock">
|
1404
|
+
<div class="content">
|
1405
|
+
<pre class="highlight"><code class="language-console" data-lang="console">$ git checkout featureA
|
1406
|
+
$ git rebase origin/master
|
1407
|
+
$ git push -f myfork featureA</code></pre>
|
1408
|
+
</div>
|
1409
|
+
</div>
|
1410
|
+
<div class="paragraph">
|
1411
|
+
<p>This rewrites your history to now look like <a href="psp_b.html">Commit history after <code>featureA</code> work</a>.</p>
|
1412
|
+
</div>
|
1413
|
+
<div id="psp_b" class="imageblock">
|
1414
|
+
<div class="content">
|
1415
|
+
<img src="../images/public-small-2.png" alt="Commit history after `featureA` work">
|
1416
|
+
</div>
|
1417
|
+
<div class="title">Figure 70. Commit history after <code>featureA</code> work</div>
|
1418
|
+
</div>
|
1419
|
+
<div class="paragraph">
|
1420
|
+
<p>Because you rebased the branch, you have to specify the <code>-f</code> to your push command in order to be able to replace the <code>featureA</code> branch on the server with a commit that isn’t a descendant of it.
|
1421
|
+
An alternative would be to push this new work to a different branch on the server (perhaps called <code>featureAv2</code>).</p>
|
1422
|
+
</div>
|
1423
|
+
<div class="paragraph">
|
1424
|
+
<p>Let’s look at one more possible scenario: the maintainer has looked at work in your second branch and likes the concept but would like you to change an implementation detail.
|
1425
|
+
You’ll also take this opportunity to move the work to be based off the project’s current <code>master</code> branch.
|
1426
|
+
You start a new branch based off the current <code>origin/master</code> branch, squash the <code>featureB</code> changes there, resolve any conflicts, make the implementation change, and then push that as a new branch:</p>
|
1427
|
+
</div>
|
1428
|
+
<div class="paragraph">
|
1429
|
+
<p></p>
|
1430
|
+
</div>
|
1431
|
+
<div class="listingblock">
|
1432
|
+
<div class="content">
|
1433
|
+
<pre class="highlight"><code class="language-console" data-lang="console">$ git checkout -b featureBv2 origin/master
|
1434
|
+
$ git merge --squash featureB
|
1435
|
+
... change implementation ...
|
1436
|
+
$ git commit
|
1437
|
+
$ git push myfork featureBv2</code></pre>
|
1438
|
+
</div>
|
1439
|
+
</div>
|
1440
|
+
<div class="paragraph">
|
1441
|
+
<p>The <code>--squash</code> option takes all the work on the merged branch and squashes it into one changeset producing the repository state as if a real merge happened, without actually making a merge commit.
|
1442
|
+
This means your future commit will have one parent only and allows you to introduce all the changes from another branch and then make more changes before recording the new commit.
|
1443
|
+
Also the <code>--no-commit</code> option can be useful to delay the merge commit in case of the default merge process.</p>
|
1444
|
+
</div>
|
1445
|
+
<div class="paragraph">
|
1446
|
+
<p>At this point, you can notify the maintainer that you’ve made the requested changes, and that they can find those changes in your <code>featureBv2</code> branch.</p>
|
1447
|
+
</div>
|
1448
|
+
<div class="imageblock">
|
1449
|
+
<div class="content">
|
1450
|
+
<img src="../images/public-small-3.png" alt="Commit history after `featureBv2` work">
|
1451
|
+
</div>
|
1452
|
+
<div class="title">Figure 71. Commit history after <code>featureBv2</code> work</div>
|
1453
|
+
</div>
|
1454
|
+
</div>
|
1455
|
+
<div class="sect3">
|
1456
|
+
<h3 id="_project_over_email">Public Project over Email</h3>
|
1457
|
+
<div class="paragraph">
|
1458
|
+
<p>
|
1459
|
+
Many projects have established procedures for accepting patches — you’ll need to check the specific rules for each project, because they will differ.
|
1460
|
+
Since there are several older, larger projects which accept patches via a developer mailing list, we’ll go over an example of that now.</p>
|
1461
|
+
</div>
|
1462
|
+
<div class="paragraph">
|
1463
|
+
<p>The workflow is similar to the previous use case — you create topic branches for each patch series you work on.
|
1464
|
+
The difference is how you submit them to the project.
|
1465
|
+
Instead of forking the project and pushing to your own writable version, you generate email versions of each commit series and email them to the developer mailing list:</p>
|
1466
|
+
</div>
|
1467
|
+
<div class="listingblock">
|
1468
|
+
<div class="content">
|
1469
|
+
<pre class="highlight"><code class="language-console" data-lang="console">$ git checkout -b topicA
|
1470
|
+
... work ...
|
1471
|
+
$ git commit
|
1472
|
+
... work ...
|
1473
|
+
$ git commit</code></pre>
|
1474
|
+
</div>
|
1475
|
+
</div>
|
1476
|
+
<div class="paragraph">
|
1477
|
+
<p>
|
1478
|
+
Now you have two commits that you want to send to the mailing list.
|
1479
|
+
You use <code>git format-patch</code> to generate the mbox-formatted files that you can email to the list — it turns each commit into an email message with the first line of the commit message as the subject and the rest of the message plus the patch that the commit introduces as the body.
|
1480
|
+
The nice thing about this is that applying a patch from an email generated with <code>format-patch</code> preserves all the commit information properly.</p>
|
1481
|
+
</div>
|
1482
|
+
<div class="listingblock">
|
1483
|
+
<div class="content">
|
1484
|
+
<pre class="highlight"><code class="language-console" data-lang="console">$ git format-patch -M origin/master
|
1485
|
+
0001-add-limit-to-log-function.patch
|
1486
|
+
0002-increase-log-output-to-30-from-25.patch</code></pre>
|
1487
|
+
</div>
|
1488
|
+
</div>
|
1489
|
+
<div class="paragraph">
|
1490
|
+
<p>The <code>format-patch</code> command prints out the names of the patch files it creates.
|
1491
|
+
The <code>-M</code> switch tells Git to look for renames.
|
1492
|
+
The files end up looking like this:</p>
|
1493
|
+
</div>
|
1494
|
+
<div class="listingblock">
|
1495
|
+
<div class="content">
|
1496
|
+
<pre class="highlight"><code class="language-console" data-lang="console">$ cat 0001-add-limit-to-log-function.patch
|
1497
|
+
From 330090432754092d704da8e76ca5c05c198e71a8 Mon Sep 17 00:00:00 2001
|
1498
|
+
From: Jessica Smith <jessica@example.com>
|
1499
|
+
Date: Sun, 6 Apr 2008 10:17:23 -0700
|
1500
|
+
Subject: [PATCH 1/2] Add limit to log function
|
1501
|
+
|
1502
|
+
Limit log functionality to the first 20
|
1503
|
+
|
1504
|
+
---
|
1505
|
+
lib/simplegit.rb | 2 +-
|
1506
|
+
1 files changed, 1 insertions(+), 1 deletions(-)
|
1507
|
+
|
1508
|
+
diff --git a/lib/simplegit.rb b/lib/simplegit.rb
|
1509
|
+
index 76f47bc..f9815f1 100644
|
1510
|
+
--- a/lib/simplegit.rb
|
1511
|
+
+++ b/lib/simplegit.rb
|
1512
|
+
@@ -14,7 +14,7 @@ class SimpleGit
|
1513
|
+
end
|
1514
|
+
|
1515
|
+
def log(treeish = 'master')
|
1516
|
+
- command("git log #{treeish}")
|
1517
|
+
+ command("git log -n 20 #{treeish}")
|
1518
|
+
end
|
1519
|
+
|
1520
|
+
def ls_tree(treeish = 'master')
|
1521
|
+
--
|
1522
|
+
2.1.0</code></pre>
|
1523
|
+
</div>
|
1524
|
+
</div>
|
1525
|
+
<div class="paragraph">
|
1526
|
+
<p>You can also edit these patch files to add more information for the email list that you don’t want to show up in the commit message.
|
1527
|
+
If you add text between the <code>---</code> line and the beginning of the patch (the <code>diff --git</code> line), the developers can read it, but that content is ignored by the patching process.</p>
|
1528
|
+
</div>
|
1529
|
+
<div class="paragraph">
|
1530
|
+
<p>To email this to a mailing list, you can either paste the file into your email program or send it via a command-line program.
|
1531
|
+
Pasting the text often causes formatting issues, especially with “smarter” clients that don’t preserve newlines and other whitespace appropriately.
|
1532
|
+
Luckily, Git provides a tool to help you send properly formatted patches via IMAP, which may be easier for you.
|
1533
|
+
We’ll demonstrate how to send a patch via Gmail, which happens to be the email agent we know best; you can read detailed instructions for a number of mail programs at the end of the aforementioned <code>Documentation/SubmittingPatches</code> file in the Git source code.</p>
|
1534
|
+
</div>
|
1535
|
+
<div class="paragraph">
|
1536
|
+
<p>
|
1537
|
+
First, you need to set up the imap section in your <code>~/.gitconfig</code> file.
|
1538
|
+
You can set each value separately with a series of <code>git config</code> commands, or you can add them manually, but in the end your config file should look something like this:</p>
|
1539
|
+
</div>
|
1540
|
+
<div class="listingblock">
|
1541
|
+
<div class="content">
|
1542
|
+
<pre class="highlight"><code class="language-ini" data-lang="ini">[imap]
|
1543
|
+
folder = "[Gmail]/Drafts"
|
1544
|
+
host = imaps://imap.gmail.com
|
1545
|
+
user = user@gmail.com
|
1546
|
+
pass = YX]8g76G_2^sFbd
|
1547
|
+
port = 993
|
1548
|
+
sslverify = false</code></pre>
|
1549
|
+
</div>
|
1550
|
+
</div>
|
1551
|
+
<div class="paragraph">
|
1552
|
+
<p>If your IMAP server doesn’t use SSL, the last two lines probably aren’t necessary, and the host value will be <code>imap://</code> instead of <code>imaps://</code>.
|
1553
|
+
When that is set up, you can use <code>git imap-send</code> to place the patch series in the Drafts folder of the specified IMAP server:</p>
|
1554
|
+
</div>
|
1555
|
+
<div class="listingblock">
|
1556
|
+
<div class="content">
|
1557
|
+
<pre class="highlight"><code class="language-console" data-lang="console">$ cat *.patch |git imap-send
|
1558
|
+
Resolving imap.gmail.com... ok
|
1559
|
+
Connecting to [74.125.142.109]:993... ok
|
1560
|
+
Logging in...
|
1561
|
+
sending 2 messages
|
1562
|
+
100% (2/2) done</code></pre>
|
1563
|
+
</div>
|
1564
|
+
</div>
|
1565
|
+
<div class="paragraph">
|
1566
|
+
<p>At this point, you should be able to go to your Drafts folder, change the To field to the mailing list you’re sending the patch to, possibly CC the maintainer or person responsible for that section, and send it off.</p>
|
1567
|
+
</div>
|
1568
|
+
<div class="paragraph">
|
1569
|
+
<p>You can also send the patches through an SMTP server.
|
1570
|
+
As before, you can set each value separately with a series of <code>git config</code> commands, or you can add them manually in the sendemail section in your <code>~/.gitconfig</code> file:</p>
|
1571
|
+
</div>
|
1572
|
+
<div class="listingblock">
|
1573
|
+
<div class="content">
|
1574
|
+
<pre class="highlight"><code class="language-ini" data-lang="ini">[sendemail]
|
1575
|
+
smtpencryption = tls
|
1576
|
+
smtpserver = smtp.gmail.com
|
1577
|
+
smtpuser = user@gmail.com
|
1578
|
+
smtpserverport = 587</code></pre>
|
1579
|
+
</div>
|
1580
|
+
</div>
|
1581
|
+
<div class="paragraph">
|
1582
|
+
<p>After this is done, you can use <code>git send-email</code> to send your patches:</p>
|
1583
|
+
</div>
|
1584
|
+
<div class="listingblock">
|
1585
|
+
<div class="content">
|
1586
|
+
<pre class="highlight"><code class="language-console" data-lang="console">$ git send-email *.patch
|
1587
|
+
0001-add-limit-to-log-function.patch
|
1588
|
+
0002-increase-log-output-to-30-from-25.patch
|
1589
|
+
Who should the emails appear to be from? [Jessica Smith <jessica@example.com>]
|
1590
|
+
Emails will be sent from: Jessica Smith <jessica@example.com>
|
1591
|
+
Who should the emails be sent to? jessica@example.com
|
1592
|
+
Message-ID to be used as In-Reply-To for the first email? y</code></pre>
|
1593
|
+
</div>
|
1594
|
+
</div>
|
1595
|
+
<div class="paragraph">
|
1596
|
+
<p>Then, Git spits out a bunch of log information looking something like this for each patch you’re sending:</p>
|
1597
|
+
</div>
|
1598
|
+
<div class="listingblock">
|
1599
|
+
<div class="content">
|
1600
|
+
<pre class="highlight"><code class="language-text" data-lang="text">(mbox) Adding cc: Jessica Smith <jessica@example.com> from
|
1601
|
+
\line 'From: Jessica Smith <jessica@example.com>'
|
1602
|
+
OK. Log says:
|
1603
|
+
Sendmail: /usr/sbin/sendmail -i jessica@example.com
|
1604
|
+
From: Jessica Smith <jessica@example.com>
|
1605
|
+
To: jessica@example.com
|
1606
|
+
Subject: [PATCH 1/2] Add limit to log function
|
1607
|
+
Date: Sat, 30 May 2009 13:29:15 -0700
|
1608
|
+
Message-Id: <1243715356-61726-1-git-send-email-jessica@example.com>
|
1609
|
+
X-Mailer: git-send-email 1.6.2.rc1.20.g8c5b.dirty
|
1610
|
+
In-Reply-To: <y>
|
1611
|
+
References: <y>
|
1612
|
+
|
1613
|
+
Result: OK</code></pre>
|
1614
|
+
</div>
|
1615
|
+
</div>
|
1616
|
+
<div class="admonitionblock tip">
|
1617
|
+
<table>
|
1618
|
+
<tr>
|
1619
|
+
<td class="icon">
|
1620
|
+
<div class="title">Tip</div>
|
1621
|
+
</td>
|
1622
|
+
<td class="content">
|
1623
|
+
<div class="paragraph">
|
1624
|
+
<p>For help on configuring your system and email, more tips and tricks, and a sandbox to send a trial patch via email, go to <a href="https://git-send-email.io" target="_blank" rel="noopener">git-send-email.io</a>.</p>
|
1625
|
+
</div>
|
1626
|
+
</td>
|
1627
|
+
</tr>
|
1628
|
+
</table>
|
1629
|
+
</div>
|
1630
|
+
</div>
|
1631
|
+
<div class="sect3">
|
1632
|
+
<h3 id="_summary_5">Summary</h3>
|
1633
|
+
<div class="paragraph">
|
1634
|
+
<p>In this section, we covered multiple workflows, and talked about the differences between working as part of a small team on closed-source projects vs contributing to a big public project.
|
1635
|
+
You know to check for white-space errors before committing, and can write a great commit message.
|
1636
|
+
You learned how to format patches, and e-mail them to a developer mailing list.
|
1637
|
+
Dealing with merges was also covered in the context of the different workflows.
|
1638
|
+
You are now well prepared to collaborate on any project.</p>
|
1639
|
+
</div>
|
1640
|
+
<div class="paragraph">
|
1641
|
+
<p>Next, you’ll see how to work the other side of the coin: maintaining a Git project.
|
1642
|
+
You’ll learn how to be a benevolent dictator or integration manager.</p>
|
1643
|
+
</div>
|
1644
|
+
</div>
|
1645
|
+
<div id="nav"><a href="_integration_manager.html">prev</a> | <a href="_git_am.html">next</a></div></div>
|
1646
|
+
</div>
|
1647
|
+
|
1648
|
+
</div>
|
1649
|
+
</div>
|
1650
|
+
<footer>
|
1651
|
+
<div class="site-source">
|
1652
|
+
<a href="https://git-scm.com/site">About this site</a><br>
|
1653
|
+
Patches, suggestions, and comments are welcome.
|
1654
|
+
</div>
|
1655
|
+
<div class="sfc-member">
|
1656
|
+
Git is a member of <a href="https://git-scm.com/sfc">Software Freedom Conservancy</a>
|
1657
|
+
</div>
|
1658
|
+
</footer>
|
1659
|
+
<a href="_project_over_email.html#top" class="no-js scrollToTop" id="scrollToTop" data-label="Scroll to top">
|
1660
|
+
<img src="../../../../images/icons/chevron-up@2x.png" width="20" height="20" alt="scroll-to-top"/>
|
1661
|
+
</a>
|
1662
|
+
<script src="../../../../assets/application-38b0d42ff05ffea45841edebbd14b75b89585646153808e82907c2c5c11f324b.js"></script>
|
1663
|
+
|
1664
|
+
</div>
|
1665
|
+
|
1666
|
+
</body>
|
1667
|
+
</html>
|