{"id":115068,"date":"2018-08-11T08:52:44","date_gmt":"2018-08-11T00:52:44","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=115068"},"modified":"2018-08-06T15:53:59","modified_gmt":"2018-08-06T07:53:59","slug":"github-use-records","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/github-use-records.html","title":{"rendered":"\u5b9e\u8df5\u64cd\u4f5c\uff1agithub\u4f7f\u7528\u8bb0\u5f55"},"content":{"rendered":"

\"\"<\/p>\n

\u5728\u9879\u76ee\u4e3b\u9875fork\u6b63\u5f0f\u4ed3\u5e93<\/strong><\/span><\/div>\n
\r\ngit clone \u81ea\u5df1fork\u51fa\u6765\u7684\u4ed3\u5e93\r\n\r\ngit remote add upstream \u6dfb\u52a0\u6b63\u5f0f\u4ed3\u5e93\u5730\u5740\r\n\r\ngit pull upstream master \u66f4\u65b0\u672c\u5730\u9879\u76ee\uff08\u62c9\u6b63\u5f0f\u4ed3\u5e93\u7684\u66f4\u65b0\uff09\r\n\r\ngit add.\r\n\r\ngit commit -m \"something\"\r\n\r\ngit push -u origin master \u66f4\u65b0\u672c\u5730\u9879\u76ee\u5230\u81ea\u5df1\u4ed3\u5e93\r\n\r\npull request\r\n<\/pre>\n
\u4ee3\u7801\u4e0d\u4e00\u81f4\u5904\u7406\u65b9\u6cd5<\/strong><\/span><\/div>\n
\r\ngit fetch upstream\r\ngit checkout master\r\ngit merge upstream\/master\r\n<\/pre>\n
\u672c\u5730\u521b\u5efa\u65b0\u5206\u652f<\/strong><\/span><\/div>\n
\r\ngit checkout -b dev\r\n<\/pre>\n
\u5173\u8054\u8fdc\u7a0b\u5206\u652f<\/strong><\/span><\/div>\n
\r\ngit branch --set-upstream-to origin\/dev dev\r\n<\/pre>\n
\u64a4\u9500\u63d0\u4ea4<\/strong><\/span><\/div>\n
\r\ngit reset commitId (\u6ce8\uff1a\u4e0d\u8981\u5e26--hard)\u5230\u4e0a\u4e2a\u7248\u672c\r\ngit stash \u6682\u5b58\u4fee\u6539\r\ngit push --force \u5f3a\u5236push,\u8fdc\u7a0b\u7684\u6700\u65b0\u7684\u4e00\u6b21commit\u88ab\u5220\u9664\r\ngit stash pop \u91ca\u653e\u6682\u5b58\u7684\u4fee\u6539\uff0c\u5f00\u59cb\u4fee\u6539\u4ee3\u7801\r\ngit add . -> git commit -m \"massage\" -> git push\r\n<\/pre>\n
\n

\u539f\u6587\u6765\u81ea\uff1ahttps:\/\/wuxiaobai.win\/archives\/353<\/a><\/p>\n

\u672c\u6587\u5730\u5740\uff1ahttps:\/\/lrxjmw.cn\/github-use-records.html<\/a>\u7f16\u8f91\uff1a\u5434\u5411\u5e73\uff0c\u5ba1\u6838\u5458\uff1a\u9004\u589e\u5b9d<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"

\u5728\u9879\u76ee\u4e3b\u9875fork\u6b63\u5f0f\u4ed3\u5e93 git clone \u81ea\u5df1fork\u51fa\u6765\u7684\u4ed3\u5e93 git remote add upst […]<\/p>\n","protected":false},"author":668,"featured_media":81201,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-115068","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/115068","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/668"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=115068"}],"version-history":[{"count":4,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/115068\/revisions"}],"predecessor-version":[{"id":115272,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/115068\/revisions\/115272"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/81201"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=115068"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=115068"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=115068"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}