{"id":43648,"date":"2023-12-11T15:00:27","date_gmt":"2023-12-11T07:00:27","guid":{"rendered":"https:\/\/wx.kaifamiao.info\/?p=43648"},"modified":"2023-12-11T15:00:27","modified_gmt":"2023-12-11T07:00:27","slug":"%e5%a6%82%e6%9e%9c%e7%ba%bf%e4%b8%8a%e5%87%ba%e7%8e%b0bug-git%e6%80%8e%e4%b9%88%e6%93%8d%e4%bd%9c%ef%bc%9f-3","status":"publish","type":"post","link":"http:\/\/wx.kaifamiao.info\/index.php\/2023\/12\/11\/%e5%a6%82%e6%9e%9c%e7%ba%bf%e4%b8%8a%e5%87%ba%e7%8e%b0bug-git%e6%80%8e%e4%b9%88%e6%93%8d%e4%bd%9c%ef%bc%9f-3\/","title":{"rendered":"\u5982\u679c\u7ebf\u4e0a\u51fa\u73b0bug git\u600e\u4e48\u64cd\u4f5c\uff1f"},"content":{"rendered":"<p>&#8220;`&#8221;<\/p>\n<p>\u65b9\u6cd51\uff1a\u5728\u5f53\u524d\u4e3b\u5206\u652f\u4fee\u6539bug\uff0c\u6682\u5b58\u5f53\u524d\u7684\u6539\u52a8\u7684\u4ee3\u7801\uff0c\u76ee\u7684\u662f\u8ba9\u5de5\u4f5c\u7a7a\u95f4\u548c\u8fdc\u7a0b\u4ee3\u7801\u4e00\u81f4\uff1a<br \/>\nGit stash<br \/>\n\u4fee\u6539\u5b8cbug\u540e\u63d0\u4ea4\u4fee\u6539\uff1a<br \/>\ngit add .<br \/>\ngit commit \u4e00m \u201cfix bug 1\u201d<br \/>\ngit push<br \/>\n\u4ece\u6682\u5b58\u533a\u628a\u4e4b\u524d\u7684\u4fee\u6539\u6062\u590d\uff0c\u8fd9\u6837\u5c31\u548c\u4e4b\u524d\u6539\u52a8\u4e00\u6837\u4e86<br \/>\ngit stash pop<br \/>\n\u8fd9\u65f6\u53ef\u80fd\u4f1a\u51fa\u73b0\u51b2\u7a81\uff0c\u56e0\u4e3a\u4f60\u4e4b\u524d\u4fee\u6539\u7684\u6587\u4ef6\uff0c\u53ef\u80fd\u548cbug\u662f\u540c\u4e00\u4e2a\u6587\u4ef6\uff0c\u5982\u679c\u6709\u51b2\u7a81\u4f1a\u63d0\u793a\uff1a<br \/>\nAuto\u4e00merging xxx.Java<br \/>\nCONFLICT (content): Merge conflict in xxx.java<br \/>\n\u524d\u5f80xxx.java\u89e3\u51b3\u51b2\u7a81<br \/>\n\u6ce8\u610fstash pop\u610f\u601d\u662f\u4ece\u6682\u5b58\u533a\u6062\u590d\u5230\u5de5\u4f5c\u7a7a\u95f4\uff0c\u540c\u65f6\u5220\u9664\u6b64\u6761\u6682\u5b58\u8bb0\u5f55\u3002<\/p>\n<p>\u65b9\u5f0f2\uff1a\u62c9\u4e00\u4e2a\u65b0\u5206\u652f\uff0c\u8001\u53f8\u673a\u90fd\u63a8\u8350\u8fd9\u6837\u505a\uff0c\u5145\u5206\u5229\u7528\u4e86git\u7279\u6027\uff0c\u5148\u6682\u5b58\u4e00\u4e0b\u5de5\u4f5c\u7a7a\u95f4\u6539\u52a8\uff1a<br \/>\ngit stash<br \/>\n\u65b0\u5efa\u4e00\u4e2a\u5206\u652f\uff0c\u5e76\u4e14\u6362\u5230\u8fd9\u4e2a\u65b0\u5206\u652f<br \/>\ngit branch fix_bug \/\/\u65b0\u5efa\u5206\u652f<br \/>\ngit checkout fix_bug \/\/\u5207\u6362\u5206\u652f<br \/>\n\u8fd9\u65f6\u5019\u5c31\u53ef\u4ee5\u5b89\u5fc3\u7684\u5728\u8fd9\u4e2afix_bug\u5206\u652f\u6539bug\u4e86\uff0c\u6539\u5b8c\u4e4b\u540e\uff1a<br \/>\ngit add .<br \/>\ngit commit \u4e00m \u201cfix a bug\u201d<br \/>\n\u5207\u6362\u5230master\u4e3b\u5206\u652f<br \/>\ngit checkout master<br \/>\n\u4ecefix_bug\u5408\u5e76\u5230master\u5206\u652f<br \/>\ngit merge fix_bug<br \/>\n\u63d0\u4ea4\u4ee3\u7801<br \/>\ngit push<br \/>\n\u7136\u540e\u4ece\u6682\u5b58\u533a\u6062\u590d\u4ee3\u7801<br \/>\ngit stash pop<br \/>\n\u6b64\u65f6\u5982\u6709\u51b2\u7a81\uff0c\u9700\u8981\u89e3\u51b3\u51b2\u7a81<\/p>\n<p>&lt;pre&gt;&lt;code&gt;            &quot;&#8220;`<br \/>\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;`&#8221; \u65b9\u6cd51\uff1a\u5728\u5f53\u524d\u4e3b\u5206\u652f\u4fee\u6539bug\uff0c\u6682\u5b58\u5f53\u524d\u7684\u6539\u52a8\u7684\u4ee3\u7801\uff0c\u76ee\u7684\u662f\u8ba9\u5de5\u4f5c\u7a7a\u95f4\u548c\u8fdc\u7a0b\u4ee3 [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-43648","post","type-post","status-publish","format-standard","hentry","category-c"],"_links":{"self":[{"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/posts\/43648","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/comments?post=43648"}],"version-history":[{"count":1,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/posts\/43648\/revisions"}],"predecessor-version":[{"id":43649,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/posts\/43648\/revisions\/43649"}],"wp:attachment":[{"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/media?parent=43648"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/categories?post=43648"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/tags?post=43648"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}