-
Notifications
You must be signed in to change notification settings - Fork 0
/
github_flow.html
113 lines (113 loc) · 35.1 KB
/
github_flow.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="ie=edge"/><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/><style data-href="/styles.a37e35d4b6bd66c8e7a4.css" id="gatsby-global-css">*{box-sizing:border-box}body{margin:0;-webkit-font-smoothing:antialiased}a{text-decoration:none;color:#14877e}.searchbox{display:inline-block;position:relative;width:200px;height:32px!important;white-space:nowrap;box-sizing:border-box;visibility:visible!important}.searchbox .algolia-autocomplete{display:block;width:100%;height:100%}.searchbox__wrapper{width:100%;height:100%;z-index:999;position:relative}.searchbox__input{display:inline-block;box-sizing:border-box;transition:box-shadow .4s ease,background .4s ease;border:0;border-radius:16px;box-shadow:inset 0 0 0 1px #ccc;background:#fff!important;padding:0 26px 0 32px;width:100%;height:100%;vertical-align:middle;white-space:normal;font-size:12px;-webkit-appearance:none;appearance:none}.searchbox__input::-webkit-search-cancel-button,.searchbox__input::-webkit-search-decoration,.searchbox__input::-webkit-search-results-button,.searchbox__input::-webkit-search-results-decoration{display:none}.searchbox__input:hover{box-shadow:inset 0 0 0 1px #b3b3b3}.searchbox__input:active,.searchbox__input:focus{outline:0;box-shadow:inset 0 0 0 1px #aaa;background:#fff}.searchbox__input::-webkit-input-placeholder{color:#aaa}.searchbox__input:-ms-input-placeholder{color:#aaa}.searchbox__input::placeholder{color:#aaa}.searchbox__submit{position:absolute;top:0;margin:0;border:0;border-radius:16px 0 0 16px;background-color:rgba(69,142,225,0);padding:0;width:32px;height:100%;vertical-align:middle;text-align:center;font-size:inherit;-webkit-user-select:none;-ms-user-select:none;user-select:none;right:inherit;left:0}.searchbox__submit:before{display:inline-block;margin-right:-4px;height:100%;vertical-align:middle;content:""}.searchbox__submit:active,.searchbox__submit:hover{cursor:pointer}.searchbox__submit:focus{outline:0}.searchbox__submit svg{width:14px;height:14px;vertical-align:middle;fill:#6d7e96}.searchbox__reset{display:block;position:absolute;top:8px;right:8px;margin:0;border:0;background:none;cursor:pointer;padding:0;font-size:inherit;-webkit-user-select:none;-ms-user-select:none;user-select:none;fill:rgba(0,0,0,.5)}.searchbox__reset.hide{display:none}.searchbox__reset:focus{outline:0}.searchbox__reset svg{display:block;margin:4px;width:8px;height:8px}.searchbox__input:valid~.searchbox__reset{display:block;-webkit-animation-name:sbx-reset-in;animation-name:sbx-reset-in;-webkit-animation-duration:.15s;animation-duration:.15s}@-webkit-keyframes sbx-reset-in{0%{-webkit-transform:translate3d(-20%,0,0);transform:translate3d(-20%,0,0);opacity:0}to{-webkit-transform:none;transform:none;opacity:1}}@keyframes sbx-reset-in{0%{-webkit-transform:translate3d(-20%,0,0);transform:translate3d(-20%,0,0);opacity:0}to{-webkit-transform:none;transform:none;opacity:1}}.algolia-autocomplete .ds-dropdown-menu:before{display:block;position:absolute;content:"";width:14px;height:14px;background:#fff;z-index:1000;top:-7px;border-top:1px solid #ddd;border-right:1px solid #ddd;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);border-radius:2px}.algolia-autocomplete .ds-dropdown-menu{box-shadow:0 1px 0 0 rgba(0,0,0,.2),0 2px 3px 0 rgba(0,0,0,.1)}@media (min-width:601px){.algolia-autocomplete.algolia-autocomplete-right .ds-dropdown-menu{right:0!important;left:inherit!important}.algolia-autocomplete.algolia-autocomplete-right .ds-dropdown-menu:before{right:48px}.algolia-autocomplete .ds-dropdown-menu{top:-6px;border-radius:4px;margin:8px 0 0;padding:0;text-align:left;height:auto;position:relative;background:#fff;border:1px solid #ddd;z-index:999;max-width:600px;min-width:500px}}@media (max-width:680px){.algolia-autocomplete .ds-dropdown-menu{z-index:100;position:fixed!important;top:115px!important;left:auto!important;right:1rem!important;width:600px;max-width:calc(100% - 2rem);max-height:calc(100% - 12rem);display:block;overflow:auto;background:#fff}.algolia-autocomplete .ds-dropdown-menu:before{right:6rem}}.algolia-autocomplete .ds-dropdown-menu .ds-suggestions{position:relative;z-index:1000}.algolia-autocomplete .ds-dropdown-menu .ds-suggestion{cursor:pointer}.algolia-autocomplete .ds-dropdown-menu [class^=ds-dataset-]{position:relative;border-radius:4px;overflow:auto;padding:0}.algolia-autocomplete .ds-dropdown-menu *{box-sizing:border-box}.algolia-autocomplete .algolia-docsearch-suggestion{position:relative;padding:0;overflow:hidden;background-color:#fff;display:block}.algolia-autocomplete .ds-cursor .algolia-docsearch-suggestion--wrapper .algolia-docsearch-suggestion--content{background:#f1f1f1}.algolia-autocomplete .algolia-docsearch-suggestion--highlight{color:teal;padding:.1em .05em}.algolia-autocomplete .algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--category-header-lvl0 .algolia-docsearch-suggestion--highlight,.algolia-autocomplete .algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--category-header-lvl1 .algolia-docsearch-suggestion--highlight{color:inherit;background:inherit}.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight{padding:0 0 1px;background:inherit;box-shadow:inset 0 -2px 0 0 teal;color:inherit}.algolia-autocomplete .algolia-docsearch-suggestion--content{display:block;float:right;width:70%;position:relative;padding:5.33333px 0 5.33333px 10.66667px;cursor:pointer}.algolia-autocomplete .algolia-docsearch-suggestion--content:before{content:"";position:absolute;display:block;top:0;height:100%;width:1px;background:#ececec;left:-1px}.algolia-autocomplete .algolia-docsearch-suggestion--category-header{position:relative;display:none;font-size:14px;background-color:#fff;border-bottom:1px solid #ececec;color:#212121;margin:0 16px;padding:8px 0 4px;line-height:1.5}.algolia-autocomplete .algolia-docsearch-suggestion--wrapper{background-color:#fff;width:100%;float:left;padding:4px 16px}.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column{float:left;width:30%;display:none;text-align:right;position:relative;padding:5.33333px 10.66667px;color:#777;font-size:.8em;word-wrap:break-word}.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column:before{content:"";position:absolute;display:block;top:0;height:100%;width:1px;background:#ececec;right:0}.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column .algolia-docsearch-suggestion--highlight{background-color:inherit;color:inherit}.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-inline{display:none}.algolia-autocomplete .algolia-docsearch-suggestion--title{margin-bottom:4px;color:#212121;font-size:.9em;font-weight:500}.algolia-autocomplete .algolia-docsearch-suggestion--text{display:block;line-height:1.8em;font-size:.8em;color:#666;padding-right:2px;word-break:break-all}.algolia-autocomplete .algolia-docsearch-suggestion--no-results{width:100%;padding:8px 0;text-align:center;font-size:1.2em;margin-top:-8px}.algolia-autocomplete .algolia-docsearch-suggestion--no-results .algolia-docsearch-suggestion--text{color:#555;margin-top:4px}.algolia-autocomplete .algolia-docsearch-suggestion--no-results:before{display:none}.algolia-autocomplete .algolia-docsearch-suggestion code{padding:1px 5px;font-size:90%;border:none;color:#222;background-color:#ebebeb;border-radius:3px;font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.algolia-autocomplete .algolia-docsearch-suggestion code .algolia-docsearch-suggestion--highlight{background:none}.algolia-autocomplete .algolia-docsearch-suggestion.algolia-docsearch-suggestion__main .algolia-docsearch-suggestion--category-header,.algolia-autocomplete .algolia-docsearch-suggestion.algolia-docsearch-suggestion__secondary .algolia-docsearch-suggestion--subcategory-column{display:block}.algolia-autocomplete .algolia-docsearch-footer{background-color:#fff;width:100%;height:30px;z-index:2000;float:right;font-size:0;line-height:0}.algolia-autocomplete .algolia-docsearch-footer--logo{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 130 18"><defs><linearGradient id="a" x1="-36.87%" x2="129.43%" y1="134.94%" y2="-27.7%"><stop stop-color="%2300AEFF" offset="0%"/><stop stop-color="%233369E7" offset="100%"/></linearGradient></defs><g fill="none" fill-rule="evenodd"><path fill="url(%23a)" d="M59.4.02h13.3a2.37 2.37 0 0 1 2.38 2.37V15.6a2.37 2.37 0 0 1-2.38 2.36H59.4a2.37 2.37 0 0 1-2.38-2.36V2.38A2.37 2.37 0 0 1 59.4.02z"/><path fill="%23FFF" d="M66.26 4.56c-2.82 0-5.1 2.27-5.1 5.08 0 2.8 2.28 5.07 5.1 5.07 2.8 0 5.1-2.26 5.1-5.07 0-2.8-2.28-5.07-5.1-5.07zm0 8.65c-2 0-3.6-1.6-3.6-3.56 0-1.97 1.6-3.58 3.6-3.58 1.98 0 3.6 1.6 3.6 3.58a3.58 3.58 0 0 1-3.6 3.57zm0-6.4v2.66c0 .07.08.13.15.1l2.4-1.24c.04-.02.06-.1.03-.14a2.96 2.96 0 0 0-2.46-1.5c-.06 0-.1.05-.1.1zm-3.33-1.96l-.3-.3a.78.78 0 0 0-1.12 0l-.36.36a.77.77 0 0 0 0 1.1l.3.3c.05.05.13.04.17 0 .2-.25.4-.5.6-.7.23-.23.46-.43.7-.6.07-.04.07-.1.03-.16zm5-.8V3.4a.78.78 0 0 0-.78-.78h-1.83a.78.78 0 0 0-.78.78v.63c0 .07.06.12.14.1a5.74 5.74 0 0 1 1.58-.22c.52 0 1.04.07 1.54.2a.1.1 0 0 0 .13-.1z"/><path fill="%23182359" d="M102.16 13.76c0 1.46-.37 2.52-1.12 3.2-.75.67-1.9 1-3.44 1-.56 0-1.74-.1-2.67-.3l.34-1.7c.78.17 1.82.2 2.36.2.86 0 1.48-.16 1.84-.5.37-.36.55-.88.55-1.57v-.35a6.37 6.37 0 0 1-.84.3 4.15 4.15 0 0 1-1.2.17 4.5 4.5 0 0 1-1.6-.28 3.38 3.38 0 0 1-1.26-.82 3.74 3.74 0 0 1-.8-1.35c-.2-.54-.3-1.5-.3-2.2 0-.67.1-1.5.3-2.06a3.92 3.92 0 0 1 .9-1.43 4.12 4.12 0 0 1 1.45-.92 5.3 5.3 0 0 1 1.94-.37c.7 0 1.35.1 1.97.2a15.86 15.86 0 0 1 1.6.33v8.46zm-5.95-4.2c0 .9.2 1.88.6 2.3.4.4.9.62 1.53.62.34 0 .66-.05.96-.15a2.75 2.75 0 0 0 .73-.33V6.7a8.53 8.53 0 0 0-1.42-.17c-.76-.02-1.36.3-1.77.8-.4.5-.62 1.4-.62 2.23zm16.13 0c0 .72-.1 1.26-.32 1.85a4.4 4.4 0 0 1-.9 1.53c-.38.42-.85.75-1.4.98-.54.24-1.4.37-1.8.37-.43 0-1.27-.13-1.8-.36a4.1 4.1 0 0 1-1.4-.97 4.5 4.5 0 0 1-.92-1.52 5.04 5.04 0 0 1-.33-1.84c0-.72.1-1.4.32-2 .22-.6.53-1.1.92-1.5.4-.43.86-.75 1.4-.98a4.55 4.55 0 0 1 1.78-.34 4.7 4.7 0 0 1 1.8.34c.54.23 1 .55 1.4.97.38.42.68.92.9 1.5.23.6.35 1.3.35 2zm-2.2 0c0-.92-.2-1.7-.6-2.22-.38-.54-.94-.8-1.64-.8-.72 0-1.27.26-1.67.8-.4.54-.58 1.3-.58 2.22 0 .93.2 1.56.6 2.1.38.54.94.8 1.64.8s1.25-.26 1.65-.8c.4-.55.6-1.17.6-2.1zm6.97 4.7c-3.5.02-3.5-2.8-3.5-3.27L113.57.92l2.15-.34v10c0 .25 0 1.87 1.37 1.88v1.8zm3.77 0h-2.15v-9.2l2.15-.33v9.54zM119.8 3.74c.7 0 1.3-.58 1.3-1.3 0-.7-.58-1.3-1.3-1.3-.73 0-1.3.6-1.3 1.3 0 .72.58 1.3 1.3 1.3zm6.43 1c.7 0 1.3.1 1.78.27.5.18.88.42 1.17.73.28.3.5.74.6 1.18.13.46.2.95.2 1.5v5.47a25.24 25.24 0 0 1-1.5.25c-.67.1-1.42.15-2.25.15a6.83 6.83 0 0 1-1.52-.16 3.2 3.2 0 0 1-1.18-.5 2.46 2.46 0 0 1-.76-.9c-.18-.37-.27-.9-.27-1.44 0-.52.1-.85.3-1.2.2-.37.48-.67.83-.9a3.6 3.6 0 0 1 1.23-.5 7.07 7.07 0 0 1 2.2-.1l.83.16v-.35c0-.25-.03-.48-.1-.7a1.5 1.5 0 0 0-.3-.58c-.15-.18-.34-.3-.58-.4a2.54 2.54 0 0 0-.92-.17c-.5 0-.94.06-1.35.13-.4.08-.75.16-1 .25l-.27-1.74c.27-.1.67-.18 1.2-.28a9.34 9.34 0 0 1 1.65-.14zm.18 7.74c.66 0 1.15-.04 1.5-.1V10.2a5.1 5.1 0 0 0-2-.1c-.23.03-.45.1-.64.2a1.17 1.17 0 0 0-.47.38c-.13.17-.18.26-.18.52 0 .5.17.8.5.98.32.2.74.3 1.3.3zM84.1 4.8c.72 0 1.3.08 1.8.26.48.17.87.42 1.15.73.3.3.5.72.6 1.17.14.45.2.94.2 1.47v5.48a25.24 25.24 0 0 1-1.5.26c-.67.1-1.42.14-2.25.14a6.83 6.83 0 0 1-1.52-.16 3.2 3.2 0 0 1-1.18-.5 2.46 2.46 0 0 1-.76-.9c-.18-.38-.27-.9-.27-1.44 0-.53.1-.86.3-1.22.2-.36.5-.65.84-.88a3.6 3.6 0 0 1 1.24-.5 7.07 7.07 0 0 1 2.2-.1c.26.03.54.08.84.15v-.35c0-.24-.03-.48-.1-.7a1.5 1.5 0 0 0-.3-.58c-.15-.17-.34-.3-.58-.4a2.54 2.54 0 0 0-.9-.15c-.5 0-.96.05-1.37.12-.4.07-.75.15-1 .24l-.26-1.75c.27-.08.67-.17 1.18-.26a8.9 8.9 0 0 1 1.66-.15zm.2 7.73c.65 0 1.14-.04 1.48-.1v-2.17a5.1 5.1 0 0 0-1.98-.1c-.24.03-.46.1-.65.18a1.17 1.17 0 0 0-.47.4c-.12.17-.17.26-.17.52 0 .5.18.8.5.98.32.2.75.3 1.3.3zm8.68 1.74c-3.5 0-3.5-2.82-3.5-3.28L89.45.92 91.6.6v10c0 .25 0 1.87 1.38 1.88v1.8z"/><path fill="%231D3657" d="M5.03 11.03c0 .7-.26 1.24-.76 1.64-.5.4-1.2.6-2.1.6-.88 0-1.6-.14-2.17-.42v-1.2c.36.16.74.3 1.14.38.4.1.78.15 1.13.15.5 0 .88-.1 1.12-.3a.94.94 0 0 0 .35-.77.98.98 0 0 0-.33-.74c-.22-.2-.68-.44-1.37-.72-.72-.3-1.22-.62-1.52-1C.23 8.27.1 7.82.1 7.3c0-.65.22-1.17.7-1.55.46-.37 1.08-.56 1.86-.56.76 0 1.5.16 2.25.48l-.4 1.05c-.7-.3-1.32-.44-1.87-.44-.4 0-.73.08-.94.26a.9.9 0 0 0-.33.72c0 .2.04.38.12.52.08.15.22.3.42.4.2.14.55.3 1.06.52.58.24 1 .47 1.27.67.27.2.47.44.6.7.12.26.18.57.18.92zM9 13.27c-.92 0-1.64-.27-2.16-.8-.52-.55-.78-1.3-.78-2.24 0-.97.24-1.73.72-2.3.5-.54 1.15-.82 2-.82.78 0 1.4.25 1.85.72.46.48.7 1.14.7 1.97v.67H7.35c0 .58.17 1.02.46 1.33.3.3.7.47 1.24.47.36 0 .68-.04.98-.1a5.1 5.1 0 0 0 .98-.33v1.02a3.87 3.87 0 0 1-.94.32 5.72 5.72 0 0 1-1.08.1zm-.22-5.2c-.4 0-.73.12-.97.38s-.37.62-.42 1.1h2.7c0-.48-.13-.85-.36-1.1-.23-.26-.54-.38-.94-.38zm7.7 5.1l-.26-.84h-.05c-.28.36-.57.6-.86.74-.28.13-.65.2-1.1.2-.6 0-1.05-.16-1.38-.48-.32-.32-.5-.77-.5-1.34 0-.62.24-1.08.7-1.4.45-.3 1.14-.47 2.07-.5l1.02-.03V9.2c0-.37-.1-.65-.27-.84-.17-.2-.45-.28-.82-.28-.3 0-.6.04-.88.13a6.68 6.68 0 0 0-.8.33l-.4-.9a4.4 4.4 0 0 1 1.05-.4 4.86 4.86 0 0 1 1.08-.12c.76 0 1.33.18 1.7.5.4.33.6.85.6 1.56v4h-.9zm-1.9-.87c.47 0 .83-.13 1.1-.38.3-.26.43-.62.43-1.08v-.52l-.76.03c-.6.03-1.02.13-1.3.3s-.4.45-.4.82c0 .26.08.47.24.6.16.16.4.23.7.23zm7.57-5.2c.25 0 .46.03.62.06l-.12 1.18a2.38 2.38 0 0 0-.56-.06c-.5 0-.92.16-1.24.5-.3.32-.47.75-.47 1.27v3.1h-1.27V7.23h1l.16 1.05h.05c.2-.36.45-.64.77-.85a1.83 1.83 0 0 1 1.02-.3zm4.12 6.17c-.9 0-1.58-.27-2.05-.8-.47-.52-.7-1.27-.7-2.25 0-1 .24-1.77.73-2.3.5-.54 1.2-.8 2.12-.8.63 0 1.2.1 1.7.34l-.4 1c-.52-.2-.96-.3-1.3-.3-1.04 0-1.55.68-1.55 2.05 0 .67.13 1.17.38 1.5.26.34.64.5 1.13.5a3.23 3.23 0 0 0 1.6-.4v1.1a2.53 2.53 0 0 1-.73.28 4.36 4.36 0 0 1-.93.08zm8.28-.1h-1.27V9.5c0-.45-.1-.8-.28-1.02-.18-.23-.47-.34-.88-.34-.53 0-.9.16-1.16.48-.25.3-.38.85-.38 1.6v2.94h-1.26V4.8h1.26v2.12c0 .34-.02.7-.06 1.1h.08a1.76 1.76 0 0 1 .72-.67c.3-.16.66-.24 1.07-.24 1.43 0 2.15.74 2.15 2.2v3.86zM42.2 7.1c.74 0 1.32.28 1.73.82.4.53.62 1.3.62 2.26 0 .97-.2 1.73-.63 2.27-.42.54-1 .82-1.75.82s-1.33-.27-1.75-.8h-.08l-.23.7h-.94V4.8h1.26v2l-.02.64-.03.56h.05c.4-.6 1-.9 1.78-.9zm-.33 1.04c-.5 0-.88.15-1.1.45-.22.3-.34.8-.35 1.5v.08c0 .72.12 1.24.35 1.57.23.32.6.48 1.12.48.44 0 .78-.17 1-.53.24-.35.36-.87.36-1.53 0-1.35-.47-2.03-1.4-2.03zm3.24-.92h1.4l1.2 3.37c.18.47.3.92.36 1.34h.04l.18-.72 1.37-4H51l-2.53 6.73c-.46 1.23-1.23 1.85-2.3 1.85-.3 0-.56-.03-.83-.1v-1c.2.05.4.08.65.08.6 0 1.03-.36 1.28-1.06l.22-.56-2.4-5.94z"/></g></svg>');background-repeat:no-repeat;background-position:50%;background-size:100%;overflow:hidden;text-indent:-9000px;width:110px;height:100%;display:block;margin-left:auto;margin-right:5px}</style><meta name="generator" content="Gatsby 2.32.13"/><style type="text/css">
.anchor.before {
position: absolute;
top: 0;
left: 0;
transform: translateX(-100%);
padding-right: 4px;
}
.anchor.after {
display: inline-block;
padding-left: 4px;
}
h1 .anchor svg,
h2 .anchor svg,
h3 .anchor svg,
h4 .anchor svg,
h5 .anchor svg,
h6 .anchor svg {
visibility: hidden;
}
h1:hover .anchor svg,
h2:hover .anchor svg,
h3:hover .anchor svg,
h4:hover .anchor svg,
h5:hover .anchor svg,
h6:hover .anchor svg,
h1 .anchor:focus svg,
h2 .anchor:focus svg,
h3 .anchor:focus svg,
h4 .anchor:focus svg,
h5 .anchor:focus svg,
h6 .anchor:focus svg {
visibility: visible;
}
</style><script>
document.addEventListener("DOMContentLoaded", function(event) {
var hash = window.decodeURI(location.hash.replace('#', ''))
if (hash !== '') {
var element = document.getElementById(hash)
if (element) {
var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
var clientTop = document.documentElement.clientTop || document.body.clientTop || 0
var offset = element.getBoundingClientRect().top + scrollTop - clientTop
// Wait for the browser to finish rendering before scrolling.
setTimeout((function() {
window.scrollTo(0, offset - 0)
}), 0)
}
}
})
</script><style data-styled="gyphcv gNLVAN gOrJcT jVGkyu hawBpy jAfsTr kTQsnG etjCag" data-styled-version="4.4.1">
/* sc-component-id: DocSearch__Form-sc-qvs5fz-0 */
.jVGkyu{margin-bottom:24px;}
/* sc-component-id: DocSearch__Input-sc-qvs5fz-1 */
.hawBpy{border:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:16px;color:#fff;width:300px;height:32px;border-radius:4px;padding:8px 8px 8px 32px;background-image:url(data:image/svg+xml;base64,PHN2ZwogIGFsdD0iU2VhcmNoIgogIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIK%0D%0AICB2aWV3Qm94PSIwIDAgMTYgMTYiCj4KICA8cGF0aAogICAgZD0iCiAgICAgIE02LjAyOTQ1LDEw%0D%0ALjIwMzI3YTQuMTczODIsNC4xNzM4MiwwLDEsMSw0LjE3MzgyLTQuMTczODJBNC4xNTYwOSw0LjE1%0D%0ANjA5LAogICAgICAwLDAsMSw2LjAyOTQ1LDEwLjIwMzI3Wm05LjY5MTk1LDQuMjE5OUwxMC44OTg5%0D%0ALDkuNTk5NzlBNS44ODAyMSw1Ljg4MDIxLAogICAgICAwLDAsMCwxMi4wNTgsNi4wMjg1Niw2LjAw%0D%0ANDY3LDYuMDA0NjcsMCwxLDAsOS41OTk3OSwxMC44OTg5bDQuODIzMzgsCiAgICAgIDQuODIzMzhh%0D%0ALjg5NzI5Ljg5NzI5LDAsMCwwLDEuMjk5MTIsMCwuODk3NDkuODk3NDksMCwwLDAtLjAwMDg3LTEu%0D%0AMjk5MDlaIgogICAgZmlsbD0iI2ZmZmZmZiIKICAvPgo8L3N2Zz4=);background-size:16px 16px;background-repeat:no-repeat;background-position-y:center;background-position-x:8px;background-color:rgba(0,0,0,0.2);} .hawBpy:focus{outline:none;}
/* sc-component-id: Header__Wrap-sc-75xirx-0 */
.gNLVAN{background:teal;min-height:80px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
/* sc-component-id: Header-sc-75xirx-1 */
.gOrJcT{margin-bottom:24px;} .gOrJcT a{color:#fff;-webkit-text-decoration:none;text-decoration:none;} .gOrJcT a:hover{color:#77f0f0;}
/* sc-component-id: Footer-sc-4dc8xa-0 */
.etjCag{width:100%;height:70px;} .etjCag nav{background:#333;min-height:70px;color:#fff;} .etjCag nav a{color:#14877e;-webkit-text-decoration:none;text-decoration:none;} .etjCag nav a:hover{-webkit-text-decoration:underline;text-decoration:underline;} .etjCag p{line-height:1.9;padding:40px;text-align:center;font-size:13px;margin-top:0;}
/* sc-component-id: Layout__Wrap-sc-74hz2d-0 */
.gyphcv{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}
/* sc-component-id: blog-post__Title-sc-1e41lke-0 */
.kTQsnG{font-family:'Crete Round',Georgia,Times New Roman,serif;font-size:24px;color:#e5533c;margin-top:0;text-align:center;}
/* sc-component-id: blog-post__Wrap-sc-1e41lke-1 */
.jAfsTr{width:100%;background:#f5f5f5;} .jAfsTr .book-wrapper{width:100%;max-width:1000px;padding:40px 16px 60px;margin:0 auto;background:#fff;} .jAfsTr blockquote{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b;padding:15px 30px;margin:0;margin-bottom:20px;border:1px solid rgba(0,0,0,0);border-radius:4px;} .jAfsTr blockquote h4{text-align:center;margin:0;} .jAfsTr .contents-wrapper{background:#f5f5f5;padding:30px 0;} .jAfsTr .chapter-contents{width:100%;max-width:800px;margin:0 auto;font-family:'ProximaNova','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:300;-webkit-letter-spacing:0.3px;-moz-letter-spacing:0.3px;-ms-letter-spacing:0.3px;letter-spacing:0.3px;line-height:36px;font-size:16px;} .jAfsTr .chapter-contents h1{font-family:'Crete Round',Georgia,Times New Roman,serif;font-size:24px;color:#e5533c;margin-top:0;text-align:center;} .jAfsTr .chapter-contents h2{font-family:'Crete Round',Georgia,Times New Roman,serif;font-size:18px;color:#14877e;} .jAfsTr .chapter-contents a{color:#14877e;-webkit-text-decoration:none;text-decoration:none;border-bottom:1px dotted #1bbfb1;} .jAfsTr .book-wrapper img{display:block;max-width:700px;margin:20px auto;width:100%;} .jAfsTr .book-wrapper img[alt='certificates']{display:block;width:291px;} .jAfsTr:not(pre) > code[class*='language-'],.jAfsTr pre{background:#f5f5f5;} .jAfsTr pre{padding:1em;margin:0.5em 0;overflow:auto;} .jAfsTr code[class*='language-'],.jAfsTr pre{color:#000;text-shadow:0 1px #fff;font-size:14px;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:26px;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;} .jAfsTr .chapter-contents pre{color:#767676;border:1px solid #dcdcdc;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;} .jAfsTr .chapter-contents p > code,.jAfsTr .chapter-contents ul > code,.jAfsTr .chapter-contents ol > code,.jAfsTr .chapter-contents li > code{padding-right:4px;padding-left:4px;padding-top:2px;padding-bottom:2px;background-color:#f5f5f5;color:#14877e;border-radius:4px;font-size:15px;}</style><title data-react-helmet="true">团队协作流程</title><link as="script" rel="preload" href="/webpack-runtime-6d5d43391d798a08cb1d.js"/><link as="script" rel="preload" href="/framework-d585a04b7d285a7760d6.js"/><link as="script" rel="preload" href="/app-53297de6fe45b94e19e4.js"/><link as="script" rel="preload" href="/styles-e9d24b1846c7d6eb9685.js"/><link as="script" rel="preload" href="/commons-3feee98700f3ba0cdb22.js"/><link as="script" rel="preload" href="/component---src-templates-blog-post-js-795d606d338983cb4fc4.js"/><link as="fetch" rel="preload" href="/page-data/github_flow.html/page-data.json" crossorigin="anonymous"/><link as="fetch" rel="preload" href="/page-data/app-data.json" crossorigin="anonymous"/></head><body><noscript id="gatsby-noscript">This app works best with JavaScript enabled.</noscript><div id="___gatsby"><div style="outline:none" tabindex="-1" id="gatsby-focus-wrapper"><div class="Layout__Wrap-sc-74hz2d-0 gyphcv"><div class="Header__Wrap-sc-75xirx-0 gNLVAN"><h2 class="Header-sc-75xirx-1 gOrJcT"><a href="/">Git 北京</a></h2><form class="DocSearch__Form-sc-qvs5fz-0 jVGkyu"><input type="search" id="algolia-doc-search" placeholder="Search docs" class="DocSearch__Input-sc-qvs5fz-1 hawBpy"/></form></div><div class="blog-post__Wrap-sc-1e41lke-1 jAfsTr"><div class="book-wrapper"><div class="blog-post__Title-sc-1e41lke-0 kTQsnG">团队协作流程</div><div class="chapter-contents"><br/><div><p>前几天还都是一个开发者唱独角戏。但是尽管如此也可以看出 git 带来的便利了,比如代码写错了可以回滚,为了新功能开发可以开新分支等等。但是 git 和 github 更大的威力在于协作,所以今天来聊团队协作流程。</p>
<p>聊了这么多天的 github,有必要稍微停下来,再想想究竟什么是 github 。没错,前面的使用中也看到了,github 是 git 仓库的托管平台,让我们的项目仓库可以方便的备份同步。但是其实也许比这个还要重要的是,github 是一个大家一起协作做项目的平台,是一种开发者的工作方式,引导一种看着不像流程但是却真正健康轻便的开发流程。</p>
<p>在 <a href="https://www.youtube.com/watch?v=qyz3jkOBbQY">How Github Use Github To Build Github</a> 的演讲中,Zach Holman 说,</p>
<blockquote>
<p>多年来我一直在寻找做软件正确的方式,现在我想我找到了,github 就是这种方式。</p>
</blockquote>
<p>Github 多年来总结出来一套自己的团队协作流程,简单而且强大,叫做 <a href="https://guides.github.com/introduction/flow/index.html">Github Flow</a> ,网站上的各个功能都是围绕着这个流程来开发的。</p>
<p>要了解一个流程,没有什么比跑一个最简单的实际例子更好的方式了,官方给出的 <a href="https://guides.github.com/activities/hello-world/">Hello World</a> 就是服务于这个目的,不过这个 Hello World 用的是纯粹的网页来实现整个流程。咱们今天用网页配合 Github For Mac 客户端来完成这个流程。</p>
<h2 id="什么是-github-flow-" style="position:relative;"><a href="#%E4%BB%80%E4%B9%88%E6%98%AF-github-flow-" aria-label="什么是 github flow permalink" class="anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>什么是 Github Flow ?</h2>
<p>来理解一下什么是 Github Flow 。说白了,就是给一个项目开发新功能要走的几步。整个过程的核心是“拉取请求” 。</p>
<p>第一步,创建新分支,用来开发这个新功能。如下图所示</p>
<p><img src="https://happypeter.github.io/images/2019031601.jpg"></p>
<p>第二步,不断实现功能,做成一个个新版本。</p>
<p><img src="https://happypeter.github.io/images/2019031602.jpg"></p>
<p>第三步,发起”拉取请求“( Pull Request ),后面简称 PR 吧。</p>
<p><img src="https://happypeter.github.io/images/2019031603.jpg"></p>
<p>第四步,大家讨论。这是一个代码审核的过程。</p>
<p><img src="https://happypeter.github.io/images/2019031604.jpg"></p>
<p>第五步,部署代码。</p>
<p><img src="https://happypeter.github.io/images/2019031604.jpg"></p>
<p>第六步,把分支的内容合并到 master 。</p>
<p><img src="https://happypeter.github.io/images/2019031606.jpg"></p>
<p>这就是整个 Github Flow 的几个步骤了。</p>
<h2 id="给队友添加写权限" style="position:relative;"><a href="#%E7%BB%99%E9%98%9F%E5%8F%8B%E6%B7%BB%E5%8A%A0%E5%86%99%E6%9D%83%E9%99%90" aria-label="给队友添加写权限 permalink" class="anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>给队友添加写权限</h2>
<p>接下来跑一个实际的例子。首先一步是给队友添加写权限,注意这里的讨论的是团队共同开发自己公司的项目,对于开源项目,是不必给贡献者添加写权限的,后续小节中会有专门介绍。</p>
<p>现在我和 @billi66 要合作开发一个新项目。于是我就来创建这个项目,过程在<a href="github_in_browser">浏览器中使用 Github</a>中已经介绍过了。下面就继续在 GUI 这个项目上做演示。</p>
<p>现在我要把 @billi66 添加进来,让她也具有项目的修改权限了。如何来做呢?把她添加成项目的“协作者”( collaborator ) 就行了。 </p>
<p>首先到项目页面,点击 Settings 一项,可以看到 collaborators 选项,输入框中输入 <code>bi</code> 就可以自动补齐出 <code>billie66</code> 了</p>
<p><img src="https://happypeter.github.io/images/2019031607.jpg"></p>
<p>回车选中,然后点 <code>Add collaborator</code> 按钮,这样就完成了。</p>
<h2 id="开话题分支并在上面开发" style="position:relative;"><a href="#%E5%BC%80%E8%AF%9D%E9%A2%98%E5%88%86%E6%94%AF%E5%B9%B6%E5%9C%A8%E4%B8%8A%E9%9D%A2%E5%BC%80%E5%8F%91" aria-label="开话题分支并在上面开发 permalink" class="anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>开话题分支并在上面开发</h2>
<p>现在我和 @billie66 都对项目有写权限,对于非常有把握的代码,可以直接在本地 master 开发然后 Push 到远端 master 分支上面。但是如果是比较重要的功能,还是要发单独开”话题分支“( Topic Branch ),这是后面发 PR 的前提。</p>
<p>尽管所有的流程操作都可以在<a href="https://github.com/blog/1557-github-flow-in-the-browser">浏览器中完成</a>。但是更为常见的情形是我和 @billie 会把代码 clone 到本地来进行新功能的开发,因为这样可以使用自己的编辑器以及测试工具。</p>
<p>现在我要对项目开发一个很大很大的功能,所以就先来开一个分支叫做 <code>describe-project</code> 。名字是越清楚越好的,这样队友比较能一眼看出我在干什么。注意开新分支一定要在刚刚更新过的 master 的基础上开。开好之后把这个分支发布到远端,以后这个分支上每次实现一点小功能就 push 到远端,这样的好处是队友可以随时看到我的进展。这部分的操作前面<a href="github_for_mac.html">客户端使用</a>中都介绍了。</p>
<p>这样我做了两个版本,而且都同步到远端仓库了。所以到 <code>describe-project</code> 分支的历史上可以看到多了下面两个新 commit 。然后就可以到项目主页,选中 <code>describe-project</code> 分支,来给 master 分支发 Pull Request 了。具体过程之前我们已经介绍过了,这里不再重复。</p>
<h2 id="讨论审核代码" style="position:relative;"><a href="#%E8%AE%A8%E8%AE%BA%E5%AE%A1%E6%A0%B8%E4%BB%A3%E7%A0%81" aria-label="讨论审核代码 permalink" class="anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>讨论审核代码</h2>
<p>这样,master 的维护者就可以就这个 Pull Request 来进行讨论和代码审核了。不一定是一个老大审核小弟们的代码,可以是队友之间的互相审核。</p>
<p>@billie66 看到这个 PR 之后,就会发表她的意见了。如果我看到之后觉得有道理,代码需要调整,那我现在是不是要撤销这 PR 重新发呢?不用。我只需要继续在 <code>describe-project</code> 分支上改代码然后再同步上来。</p>
<p><img src="https://happypeter.github.io/images/2019031608.jpg"></p>
<p>Pull Request 讨论不断继续,会形成一条由评论和代码穿插而成的线。最后达成一致,我或者 @billie 其中之一可以点一下上面的大大的 <code>Merge Pull Request</code> ( 融合拉取请求 )的按钮,这样话题分支上的代码就合并到 master 之上了。接下来 <code>describe-project</code> 这个话题分支也就可以删掉,然后关闭这个 PR 了。</p>
<h2 id="快速-pr" style="position:relative;"><a href="#%E5%BF%AB%E9%80%9F-pr" aria-label="快速 pr permalink" class="anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>快速 PR</h2>
<p>走一遍 Github Flow 方式并不唯一。前面讨论的,在自己的机器上改代码,用客户端作 commit,然后在网页上发 PR 是一种常见的方式。如果我只是改一个文件中的一个小地方,完全可以使用 github 网页功能提供的<a href="https://github.com/blog/1945-quick-pull-requests">快速 PR</a>这种方法。来演示一下。</p>
<p>网页界面中,找到我要修改的文件,点击 <code>edit</code>,修改一下文件内容,然后在下面的界面中,可以直接填写一个 Topic 分支名,创建这个分支,并 commit 到这个分支上发 PR 了。</p>
<p><img src="https://happypeter.github.io/images/2019031609.jpg"></p>
<p>如果只是一个小改动,即使是对于老手,切换到编辑器和客户端,跑一遍整个 PR 的流程,也会觉得挺麻烦的。快速 PR 方法真的是非常方便。</p>
<h2 id="总结" style="position:relative;"><a href="#%E6%80%BB%E7%BB%93" aria-label="总结 permalink" class="anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>总结</h2>
<p>其实,每一个打开的 PR 都很类似于后面我们要讲的 Issue ( 事务卡片 ),比如二者都可以用 Markdown 格式来写评论。这些技巧会在 Issue 相关的那一部分来介绍。</p></div></div></div></div><footer class="Footer-sc-4dc8xa-0 etjCag"><nav><p>有任何问题请联系<a href="https://github.com/happypeter"> happypeter</a> : [email protected] <br/> 所有内容基于<!-- --> <a href="https://creativecommons.org/licenses/by/4.0/">允许商用保留署名的 CC 协议</a> <!-- -->发布</p></nav></footer></div></div><div id="gatsby-announcer" style="position:absolute;top:0;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0" aria-live="assertive" aria-atomic="true"></div></div><script id="gatsby-script-loader">/*<![CDATA[*/window.pagePath="/github_flow.html";/*]]>*/</script><script id="gatsby-chunk-mapping">/*<![CDATA[*/window.___chunkMapping={"polyfill":["/polyfill-79abd7c50267fa169289.js"],"app":["/app-53297de6fe45b94e19e4.js"],"component---src-pages-index-js":["/component---src-pages-index-js-99193552b849bd929f2a.js"],"component---src-templates-blog-post-js":["/component---src-templates-blog-post-js-795d606d338983cb4fc4.js"]};/*]]>*/</script><script src="/polyfill-79abd7c50267fa169289.js" nomodule=""></script><script src="/component---src-templates-blog-post-js-795d606d338983cb4fc4.js" async=""></script><script src="/commons-3feee98700f3ba0cdb22.js" async=""></script><script src="/styles-e9d24b1846c7d6eb9685.js" async=""></script><script src="/app-53297de6fe45b94e19e4.js" async=""></script><script src="/framework-d585a04b7d285a7760d6.js" async=""></script><script src="/webpack-runtime-6d5d43391d798a08cb1d.js" async=""></script><script src="//cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script></body></html>