{"id":598,"date":"2019-11-09T10:16:47","date_gmt":"2019-11-09T02:16:47","guid":{"rendered":"http:\/\/blog.xrhoujie.com\/?p=598"},"modified":"2019-11-07T10:17:27","modified_gmt":"2019-11-07T02:17:27","slug":"%e6%b7%bb%e5%8a%a0%e8%bf%9c%e7%ab%af%e4%bb%93%e5%ba%93%e4%b8%8e%e6%93%8d%e4%bd%9c","status":"publish","type":"post","link":"http:\/\/blog.xrhoujie.com\/?p=598","title":{"rendered":"\u6dfb\u52a0\u8fdc\u7aef\u4ed3\u5e93\u4e0e\u64cd\u4f5c"},"content":{"rendered":"<div class=\"d-flex flex-column flex-md-row gh-header\">\n<h1 class=\"flex-auto min-width-0 mb-2 mb-md-0 mr-0 mr-md-2 gh-header-title instapaper_title\">\u4fdd\u6301fork\u4e4b\u540e\u7684\u9879\u76ee\u548c\u4e0a\u6e38\u540c\u6b65<\/h1>\n<div class=\"mt-0 mt-lg-1 flex-shrink-0 gh-header-actions\"><\/div>\n<\/div>\n<div id=\"wiki-content\" class=\"d-flex flex-column flex-md-row\">\n<div id=\"wiki-body\" class=\"mt-4 flex-auto min-width-0 gollum-markdown-content instapaper_body\">\n<div class=\"markdown-body\">\n<p>\u56e2\u961f\u534f\u4f5c\uff0c\u4e3a\u4e86\u89c4\u8303\uff0c\u4e00\u822c\u90fd\u662ffork\u7ec4\u7ec7\u7684\u4ed3\u5e93\u5230\u81ea\u5df1\u5e10\u53f7\u4e0b\uff0c\u518d\u63d0\u4ea4pr\uff0c\u7ec4\u7ec7\u7684\u4ed3\u5e93\u4e00\u76f4\u4fdd\u6301\u66f4\u65b0\uff0c\u4e0b\u9762\u4ecb\u7ecd\u5982\u4f55\u4fdd\u6301\u81ea\u5df1fork\u4e4b\u540e\u7684\u4ed3\u5e93\u4e0e\u4e0a\u6e38\u4ed3\u5e93\u540c\u6b65\u3002<\/p>\n<p>\u4e0b\u9762\u4ee5\u6211 fork \u56e2\u961f\u7684\u535a\u5ba2\u4ed3\u5e93\u4e3a\u4f8b<\/p>\n<p>\u70b9\u51fb fork \u7ec4\u7ec7\u4ed3\u5e93\u5230\u81ea\u5df1\u5e10\u53f7\u4e0b\uff0c\u7136\u540e\u5c31\u53ef\u4ee5\u5728\u81ea\u5df1\u7684\u5e10\u53f7\u4e0b clone \u76f8\u5e94\u7684\u4ed3\u5e93<\/p>\n<p>\u4f7f\u7528\u00a0<code>git remote -v<\/code>\u00a0\u67e5\u770b\u5f53\u524d\u7684\u8fdc\u7a0b\u4ed3\u5e93\u5730\u5740\uff0c\u8f93\u51fa\u5982\u4e0b\uff1a<\/p>\n<div class=\"highlight highlight-source-shell\">\n<pre>origin  git@github.com:ibrother\/staticblog.github.io.git (fetch)\r\norigin  git@github.com:ibrother\/staticblog.github.io.git (push)<\/pre>\n<\/div>\n<p>\u53ef\u4ee5\u770b\u5230\u4ece\u81ea\u5df1\u5e10\u53f7 clone \u4e0b\u6765\u7684\u4ed3\u5e93\uff0c\u8fdc\u7a0b\u4ed3\u5e93\u5730\u5740\u662f\u4e0e\u81ea\u5df1\u7684\u8fdc\u7a0b\u4ed3\u5e93\u7ed1\u5b9a\u7684\uff08\u8fd9\u4e0d\u662f\u5e9f\u8bdd\u5417\uff09<\/p>\n<p>\u63a5\u4e0b\u6765\u8fd0\u884c\u00a0<code>git remote add upstream https:\/\/github.com\/staticblog\/staticblog.github.io.git<\/code><\/p>\n<p>\u8fd9\u6761\u547d\u4ee4\u5c31\u7b97\u6dfb\u52a0\u4e00\u4e2a\u522b\u540d\u4e3a upstream\uff08\u4e0a\u6e38\uff09\u7684\u5730\u5740\uff0c\u6307\u5411\u4e4b\u524d fork \u7684\u539f\u4ed3\u5e93\u5730\u5740\u3002<code>git remote -v<\/code>\u00a0\u8f93\u51fa\u5982\u4e0b\uff1a<\/p>\n<div class=\"highlight highlight-source-shell\">\n<pre>origin  git@github.com:ibrother\/staticblog.github.io.git (fetch)\r\norigin  git@github.com:ibrother\/staticblog.github.io.git (push)\r\nupstream        https:\/\/github.com\/staticblog\/staticblog.github.io.git (fetch)\r\nupstream        https:\/\/github.com\/staticblog\/staticblog.github.io.git (push)<\/pre>\n<\/div>\n<p>\u4e4b\u540e\u8fd0\u884c\u4e0b\u9762\u51e0\u6761\u547d\u4ee4\uff0c\u5c31\u53ef\u4ee5\u4fdd\u6301\u672c\u5730\u4ed3\u5e93\u548c\u4e0a\u6e38\u4ed3\u5e93\u540c\u6b65\u4e86<\/p>\n<div class=\"highlight highlight-source-shell\">\n<pre>git fetch upstream\r\ngit checkout master\r\ngit merge upstream\/master<\/pre>\n<\/div>\n<p>\u63a5\u7740\u5c31\u662f\u719f\u6089\u7684\u63a8\u9001\u672c\u5730\u4ed3\u5e93\u5230\u8fdc\u7a0b\u4ed3\u5e93<\/p>\n<div class=\"highlight highlight-source-shell\">\n<pre>git push origin master<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u4fdd\u6301fork\u4e4b\u540e\u7684\u9879\u76ee\u548c\u4e0a\u6e38\u540c\u6b65 \u56e2\u961f\u534f\u4f5c\uff0c\u4e3a\u4e86\u89c4\u8303\uff0c\u4e00\u822c\u90fd\u662ffork\u7ec4\u7ec7\u7684\u4ed3\u5e93\u5230\u81ea\u5df1\u5e10\u53f7\u4e0b\uff0c\u518d\u63d0\u4ea4pr\uff0c\u7ec4\u7ec7 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":165,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[14],"tags":[22],"_links":{"self":[{"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/posts\/598"}],"collection":[{"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=598"}],"version-history":[{"count":2,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/posts\/598\/revisions"}],"predecessor-version":[{"id":600,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/posts\/598\/revisions\/600"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/media\/165"}],"wp:attachment":[{"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=598"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=598"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=598"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}