{"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
\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