{"id":88315,"date":"2020-02-11T19:14:22","date_gmt":"2020-02-11T11:14:22","guid":{"rendered":"http:\/\/4563.org\/?p=88315"},"modified":"2020-02-11T19:14:22","modified_gmt":"2020-02-11T11:14:22","slug":"git-%e8%af%af%e5%88%a0%e4%ba%86%e4%bb%a3%e7%a0%81%ef%bc%8c%e5%a6%82%e4%bd%95%e6%89%be%e5%9b%9e%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=88315","title":{"rendered":"Git \u8bef\u5220\u4e86\u4ee3\u7801\uff0c\u5982\u4f55\u627e\u56de\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  Git \u8bef\u5220\u4e86\u4ee3\u7801\uff0c\u5982\u4f55\u627e\u56de\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ljxok2001 <\/span>  <span><i><\/i> 17<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u624b\u8d31\u6267\u884c\u4e86\u4e2a git \u547d\u4ee4\uff1agit clean -fdx\uff0c\u7136\u540e\u5f88\u591a\u6ca1 add \u5230\u7248\u672c\u63a7\u5236\u4e2d\u7684\u6587\u4ef6\u88ab\u6e05\u6389\u4e86\uff0cgoogle \u4e86\u5f88\u4e45\uff0c\u90fd\u8bf4\u8fd9\u4e9b\u7528 git \u662f\u627e\u4e0d\u56de\u8fd9\u4e9b\u8bef\u5220\u6587\u4ef6\u4e86\u3002<\/p>\n<p>\u90a3\u4e48\uff0c\u6709\u6ca1\u6709\u5982\u4e0b\u7684\u53ef\u80fd\uff1a<\/p>\n<p>1 \u3001\u7531\u4e8e\u6211\u7684\u5927\u90e8\u4ee3\u7801\u90fd\u662f javascript\uff0c\u5728 chrome \u6253\u5f00\u8fc7\u9875\u9762\uff0c\u6709\u6ca1\u529e\u6cd5\u4ece chrome \u7f13\u5b58\u6587\u4ef6\u4e2d\u56de\u8fd9\u4e9b\u6587\u4ef6\uff1f\u6211\u7684\u7cfb\u7edf\u662f Mac OS.<\/p>\n<p>2 \u3001Mac OS \u6709\u6ca1\u6709\u529e\u6cd5\u7528\u6587\u4ef6\u7cfb\u7edf\u6765\u6062\u590d\u8fd9\u4e9b\u8bef\u5220\u6587\u4ef6\uff1f\u6216\u8005\u6709\u6ca1\u54ea\u4e2a\u6587\u4ef6\u6062\u590d\u5de5\u5177\uff1f<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>10<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"1141463\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Trim21 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u770b\u770b ide \u6709\u6ca1\u6709\u6587\u4ef6\u7f13\u5b58\u3002\u3002\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1141464\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : pkuphy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6709\u5f00\u65f6\u95f4\u673a\u5668\u5417\uff1f<\/p>\n<p>\u4f7f\u7528 IDE \u4e86\u5417\uff1f IDE \u6bd4\u5982 WebStorm \u662f\u6709\u5386\u53f2\u8bb0\u5f55\u7684                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1141465\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Trim21 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Trim21 \u6587\u4ef6\u7f13\u5b58-&gt;\u6587\u4ef6\u5386\u53f2                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1141466\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : msg7086 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8fd9\u4e9b\u6587\u4ef6\u6709\u6ca1\u6709\u88ab git \u66fe\u7ecf stash \u8fc7\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1141467\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Mutoo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5982\u679c\u4f60\u7528\u7684\u662f JetBrains \u5bb6\u7684 IDE\uff0cVCS \u83dc\u5355\u4e0b\u6709\u4e00\u4e2a Local History\uff0c\u53ef\u4ee5\u6062\u590d\u88ab\u5220\u9664\u7684\u6587\u4ef6\uff0c\u5373\u4f7f\u6ca1\u6709\u52a0\u5165\u5230 git \u4e5f\u884c\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1141468\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ycr6708536 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u63d0\u4ea4\u8fc7\u7684\u8bdd\u53ef\u4ee5\u770b\u4e0b reflog                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1141469\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : sunziren <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u628a\u786c\u76d8\u62d4\u4e0b\u6765\uff0c\u9001\u53bb\u6dd8\u5b9d\u6570\u636e\u6062\u590d                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1141470\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : tyx1703 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6628\u5929 `git checkout &#8212; .` \u7136\u540e\u9760 PyCharm Local History \u627e\u56de\u7684\u8def\u8fc7\u3002\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1141471\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : crazybinggan <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u6628\u5929 git reset &#8211;hard\uff0c\u4e00\u5468\u7684\u4ee3\u7801\u5168\u6ca1\u4e86\uff08\u56e0\u4e3a\u5f88\u591a\u5173\u8054\uff0c\u4e0d\u597d\u7ec6\u7c92\u5ea6\u63d0\u4ea4\uff0c\u9700\u8981\u6574\u5757\u5b8c\u6210\uff09\uff0c\u8fd8\u597d\u5f00\u7740 JB\uff0c\u6709 local history\uff0c\u635f\u5931\u4e86\u90e8\u5206\u4ee3\u7801\uff0c\u4f46\u662f\u4e07\u5e78\u6709\u8fd9\u73a9\u610f\uff0c\u4e0d\u7136\u771f\u8dea\u4e86\u3002<\/p>\n<p>git reflog \u7ed3\u5408\u6211\u81ea\u8eab\u7684\u64cd\u4f5c\uff0c\u53ea\u80fd\u662f\u672c\u5730 commit \u8fc7\u4e4b\u540e\u7684\u53ef\u4ee5\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1141472\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : dilu <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             #5 \u662f\u6b63\u786e\u65b9\u6848\uff0cJetbrains \u5bb6\u7684 IDE \u7684\u6587\u4ef6\u5386\u53f2\u5f88\u597d\u7528                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>Git \u8bef\u5220\u4e86\u4ee3\u7801\uff0c\u5982\u4f55\u627e\u56de\uff1f \u8cc7&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/88315"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=88315"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/88315\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=88315"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=88315"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=88315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}