{"id":98758,"date":"2020-04-04T01:47:39","date_gmt":"2020-04-03T17:47:39","guid":{"rendered":"http:\/\/4563.org\/?p=98758"},"modified":"2020-04-04T01:47:39","modified_gmt":"2020-04-03T17:47:39","slug":"gitignore-%e7%9a%84-pattern-%e6%98%af%e5%90%a6%e5%8f%af%e4%bb%a5%e6%9d%a5%e8%87%aa%e4%ba%8e%e6%9f%90%e4%b8%aa%e6%96%87%e4%bb%b6%e5%a4%b9%e4%b8%8b%e7%9a%84%e6%89%80%e6%9c%89%e6%96%87%e4%bb%b6%e9%87%8c","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=98758","title":{"rendered":"gitignore \u7684 pattern \u662f\u5426\u53ef\u4ee5\u6765\u81ea\u4e8e\u67d0\u4e2a\u6587\u4ef6\u5939\u4e0b\u7684\u6240\u6709\u6587\u4ef6\u91cc\u5199\u7684 pattern\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  gitignore \u7684 pattern \u662f\u5426\u53ef\u4ee5\u6765\u81ea\u4e8e\u67d0\u4e2a\u6587\u4ef6\u5939\u4e0b\u7684\u6240\u6709\u6587\u4ef6\u91cc\u5199\u7684 pattern\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : lights <\/span>  <span><i><\/i> 53<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u8be6\u7ec6\u8868\u8fbe\u4e00\u4e0b \u80cc\u666f\u662f\u6211\u5728\u5b66\u4e00\u95e8\u65b0\u7684\u8bed\u8a00 C#&amp;Unity\uff0c\u4f46\u662f Git \u7684\u5ffd\u7565\u6587\u4ef6\u7684\u914d\u7f6e\u5c31\u6ca1\u6709\u8003\u8651\u5230\u8fd9\u4e24\u79cd\u60c5\u51b5\u7684 gitignore\uff0c\u8fd9\u4e2a\u65f6\u5019\u53d1\u73b0\u4e86\u4e00\u4e2a\u5df2\u7ecf\u7edf\u8ba1\u597d\u7684 gitignore \u5217\u8868 https:\/\/github.com\/github\/gitignore<\/p>\n<p>\u4f46\u8fd9\u4e2a\u5217\u8868\u91cc\u7684\u6587\u4ef6\u662f\u4e00\u4e2a\u4e00\u4e2a\u7684\uff0c\u6211\u60f3\u628a\u8fd9\u4e2a\u4ed3\u5e93 clone \u4e0b\u6765\uff0c\u76f4\u63a5\u8bbe\u7f6e git \u8bfb\u53d6\u8fd9\u4e2a\u4ed3\u5e93\u91cc\u7684\u6240\u6709\u6587\u4ef6\u6765\u751f\u6210\u5ffd\u7565\u89c4\u5219\uff0c\u4f46\u7ffb git \u7684\u6587\u6863\uff08 https:\/\/git-scm.com\/docs\/gitignore \uff09\u53d1\u73b0 gitignore \u57fa\u672c\u4e0a\u90fd\u53ea\u652f\u6301\u4ece\u4e00\u4e2a\u6587\u4ef6\u91cc\u8bfb\u53d6\uff0c\u800c\u4e0d\u662f\u4ece\u6587\u4ef6\u5939\u91cc\u8bfb\u53d6<\/p>\n<p>\u6240\u4ee5\u60f3\u8bf7\u6559\u4e00\u4e0b\u662f\u5426\u8fd8\u6709\u529e\u6cd5\u53ef\u4ee5\u8bfb\u53d6\u6587\u4ef6\u5939\u7684\u914d\u7f6e\uff0c\u4e5f\u8bb8\u6211\u54ea\u91cc\u7406\u89e3\u9519\u8bef\u4e86\uff0c\u6216\u8005\u770b\u6f0f\u4e86<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>11<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"727958\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xupefei <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5199\u4e2a\u811a\u672c\u6267\u884c\u4e00\u53e5 cat csharp.gitignore unity.gitignore &gt; .gitignore \uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"727959\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : lights <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @xupefei \u8fd9\u4e2a\u6709\u8003\u8651\u5440\uff0c\u4f46\u662f\u89c9\u5f97\u4e0d\u4f18\u96c5\uff0c\u6ca1\u529e\u6cd5\u4e86\u6211\u518d\u8003\u8651\u8fd9\u79cd\u64cd\u4f5c                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"727960\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : rayhy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             gitignore.io \u540e\u9762\u52a0 tag \u5c31\u884c\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"727961\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : networm <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u9700\u8981\u628a\u6240\u6709\u7684\u5ffd\u7565\u89c4\u5219\u5199\u5230 .gitignore \u4e2d\uff0c\u4e0a\u7684\u65b9\u6cd5\u5c31\u53ef\u4ee5\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528 https:\/\/gitignore.io \u751f\u6210\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"727962\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : lights <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @rayhy <br \/>@networm <br \/>\u8c22\u8c22\u56de\u590d\uff0c\u8fd9\u4e2a\u7f51\u7ad9\u5f88\u597d\u7528<br \/>\u53e6\u5916\u627e\u5230\u4e86\u4e00\u4e2a\u8bf4 best practices \u7684\u7528\u6cd5 https:\/\/stackoverflow.com\/questions\/10274424\/best-practice-for-using-multiple-gitignore-files<br \/>emm\u2026\u2026\u6211\u61d2\uff0c\u6211\u8fd8\u662f\u8bbe\u7f6e\u5168\u5c40\u7684 ignore\uff0c\u54c8\u54c8\u54c8\u54c8                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"727963\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : networm <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @lights \u4f60\u4f1a\u4e3a\u4f60\u7684\u61d2\u4ed8\u51fa\u4ee3\u4ef7\u7684\uff0c\u6bd5\u7adf\u4e0d\u662f\u6240\u6709\u9879\u76ee\u7684\u5ffd\u7565\u89c4\u5219\u90fd\u4e00\u6837\uff0c\u6709\u53ef\u80fd\u5168\u5c40\u5ffd\u7565\u91cc\u9762\u5b58\u5728\u7528\u5230\u7684\u4e1c\u897f\uff0c\u81ea\u5df1\u6d4b\u8bd5\u65f6\u6ca1\u95ee\u9898\uff0c\u4e0e\u4ed6\u4eba\u534f\u4f5c\u65f6\u53d1\u73b0\u7f3a\u5c11\u6587\u4ef6\uff1b\u4e5f\u4f1a\u51fa\u73b0\u534f\u4f5c\u65f6\uff0c\u5176\u4ed6\u4eba\u63d0\u4ea4\u4e86\u4e00\u5927\u5806\u4f60\u5ffd\u7565\u7684\u6587\u4ef6\uff0c\u5e76\u4e14\u90fd\u662f\u5927\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\uff0c\u4ed3\u5e93\u4f53\u79ef\u7ffb\u4e86\u51e0\u5341\u500d\u3002\u8bf7\u5728\u90a3\u4e2a\u65f6\u5019\u518d\u56de\u6765\u56de\u590d\u8fd9\u4e2a\u5e16\u5b50\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"727964\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : lights <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @networm \u8c22\u8c22\u63d0\u9192\uff0c\u4eba\u5bb6 stack overflow \u7684\u56de\u7b54\u6211\u770b\u5f97\u61c2                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"727965\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : lights <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @networm \u6211\u672c\u673a\u4e2a\u4eba\u5f00\u53d1\u73af\u5883\u6ca1\u6709\u534f\u4f5c\u4e00\u8bf4                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"727966\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Kobayashi <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             gitignore.io \u5c31\u662f\u8fd9\u4e48\u5e72\u7684\uff0c\u62fc\u63a5\u6587\u4ef6\u751f\u6210\u6a21\u677f\u3002\u5176\u4f7f\u7528\u7684\u662f\u57fa\u4e8e github\/gitignore \u4fee\u6539\u7248\u6a21\u677f dvcs\/gitignore\u3002<\/p>\n<p>gitignore.io \u7ed9\u51fa\u7684\u65b9\u6848\u662f\u6bcf\u6b21 curl\uff0cZSH \u7528\u6237\u63a8\u8350\u8fd9\u4e2a\u63d2\u4ef6\u76f4\u63a5\u79bb\u7ebf\u83b7\u53d6\u6a21\u677f\u3002https:\/\/github.com\/laggardkernel\/git-ignore                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"727967\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : bwangel <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             $ which gi<br \/>gi () {<br \/> curl -sL https:\/\/www.gitignore.io\/api\/${(j:,:)@}<br \/>}<\/p>\n<p>\u4e0d\u7528\u6574\u63d2\u4ef6\u5565\u7684\uff0c\u76f4\u63a5\u5199\u4e00\u4e2a\u51fd\u6570\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"727968\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : bwangel <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             $ gi python go &gt;&gt; .gitignore<\/p>\n<p>\u9644\u7528\u6cd5                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>gitignore \u7684 patte&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\/98758"}],"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=98758"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/98758\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=98758"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=98758"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=98758"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}