{"id":207713,"date":"2020-12-30T10:47:22","date_gmt":"2020-12-30T02:47:22","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=207713"},"modified":"2020-12-22T10:49:06","modified_gmt":"2020-12-22T02:49:06","slug":"git-capitalize-letter","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/git-capitalize-letter.html","title":{"rendered":"\u5728 Git \u4e2d\u5982\u4f55\u66f4\u6539\u6587\u4ef6\u540d\u9996\u5b57\u6bcd\u4e3a\u5927\u5199"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u4e00\u822c\u5f00\u53d1\u4e2d\u5728 Mac \u4e0a\u5f00\u53d1\u7a0b\u5e8f\uff0c\u5e76\u4f7f\u7528 Git \u8fdb\u884c\u7248\u672c\u7ba1\u7406\uff0c\u5728\u4f7f\u7528 React \u7f16\u5199 Component \u65f6\uff0c\u7ec4\u4ef6\u540d\u4e00\u822c\u5efa\u8bae\u9996\u5b57\u6bcd\u5927\u5199\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\"\"<\/p>\n

\u4e00\u822c\u5f00\u53d1\u4e2d\u5728 Mac \u4e0a\u5f00\u53d1\u7a0b\u5e8f\uff0c\u5e76\u4f7f\u7528 Git \u8fdb\u884c\u7248\u672c\u7ba1\u7406\uff0c\u5728\u4f7f\u7528 React \u7f16\u5199 Component \u65f6\uff0c\u7ec4\u4ef6\u540d\u4e00\u822c\u5efa\u8bae\u9996\u5b57\u6bcd\u5927\u5199\u3002<\/p>\n

\u300c\u6709\u4e9b\u540c\u5b66\u5bf9 React \u7ec4\u4ef6\u7684\u6587\u4ef6\u8fdb\u884c\u547d\u540d\u65f6\uff0c\u521a\u5f00\u59cb\u662f\u5c0f\u5199\uff0c\u540e\u6765\u4e3a\u4e86\u4fdd\u6301\u56e2\u961f\u4e00\u81f4\uff0c\u53c8\u6539\u6210\u4e86\u5927\u5199\uff0c\u7136\u800c git \u4e0d\u4f1a\u53d1\u73b0\u5927\u5c0f\u5199\u7684\u53d8\u5316\uff0c\u6b64\u65f6\u5c31\u51fa\u4e86\u95ee\u9898\u3002\u300d<\/p>\n

\u518d\u68b3\u7406\u4e00\u904d\u8fd9\u4e2a\u903b\u8f91\uff1a<\/p>\n

    \n\u5c0f\u660e\u7f16\u5199\u7ec4\u4ef6 button.js\uff0c\u63d0\u4ea4\u4ee3\u7801
    \n\u5c0f\u660e\u89c9\u5f97\u7ec4\u4ef6\u547d\u540d\u4e0d\u59a5\uff0c\u6539\u4e3a Button.js
    \n\u5c0f\u660e\u5e76\u4fee\u6539\u6240\u6709\u6587\u4ef6\u5bf9\u5b83\u7684\u5f15\u7528\uff0c\u672c\u5730\u73af\u5883\u8fd0\u884c\u6b63\u5e38\uff0c\u63d0\u4ea4\u4ee3\u7801
    \n\u6784\u5efa\u670d\u52a1\u5668\u901a\u8fc7 Git \u62c9\u53d6\u4ee3\u7801\uff0c\u8fdb\u884c\u6784\u5efa\uff0cGit \u4e3a\u8ba4\u8bc6\u5230 button.js \u5927\u5c0f\u5199\u53d1\u751f\u53d8\u5316\uff0c\u6240\u6709\u5f15\u7528 Button.js \u7684\u7ec4\u4ef6\u53d1\u751f\u62a5\u9519\uff0c\u5931\u8d25<\/ol>\n

    \u6765\u91cd\u73b0\u4e00\u4e0b\u72af\u9519\u7684\u8fd9\u4e2a\u8fc7\u7a0b\uff1a<\/p>\n

    \r\n# \u521a\u5f00\u59cb test \u6587\u4ef6\u662f\u7531\u5185\u5bb9\u7684 \r\n~\/Documents\/ignorecase-test(master ✔) cat test \r\nhello \r\n \r\n# \u628a test \u6587\u4ef6\u6539\u6210\u9996\u5b57\u6bcd\u5927\u5199\u7684 Test \u6587\u4ef6 \r\n~\/Documents\/ignorecase-test(master ✔) mv test Test \r\n \r\n# \u6ce8\u610f\u6b64\u65f6 git status \u5e76\u6ca1\u6709\u53d1\u751f\u6539\u53d8 \r\n~\/Documents\/ignorecase-test(master ✔) \r\n~\/Documents\/ignorecase-test(master ✔) git ls-files \r\ntest \r\n~\/Documents\/ignorecase-test(master ✔) ls \r\nTest \r\n<\/pre>\n
    \u89e3\u51b3\u65b9\u6848<\/strong><\/div>\n

    \u901a\u8fc7 git mv\uff0c\u5728 Git \u6682\u5b58\u533a\u4e2d\u518d\u66f4\u6539\u4e00\u904d\u6587\u4ef6\u5927\u5c0f\u5199\u89e3\u51b3\u95ee\u9898<\/p>\n

    \r\n$ git mv test Test \r\n<\/pre>\n

    \u4f46\u662f\u4fee\u6539\u6587\u4ef6\u5939\u65f6\u4f1a\u51fa\u73b0\u4e00\u4e9b\u95ee\u9898\uff1a<\/p>\n

    fatal: renaming 'dir' failed: Invalid argument<\/p>\n

    \u4f7f\u7528\u4e0b\u8fb9\u8fd9\u4e2a\u7b28\u529e\u6cd5\u4fee\u6539\uff1a<\/p>\n

    \r\n$ git mv dir DirTemp \r\n$ git mv DirTemp Dir \r\n<\/pre>\n
    \u9884\u9632\u65b9\u6848<\/strong><\/div>\n

    \u90a3\u6709\u6ca1\u6709\u4ec0\u4e48\u9884\u9632\u63aa\u65bd?<\/p>\n

    \u300cGit \u9ed8\u8ba4\u662f\u5ffd\u7565\u5927\u5c0f\u5199\u7684\uff0c\u5982\u679c\u6539\u6210\u4e0d\u5ffd\u7565\u5927\u5c0f\u5199\u662f\u4e0d\u5c31\u53ef\u4ee5\u4e86?\u4e0d\u884c\uff0c\u8fd9\u6837\u4f1a\u4ea7\u751f\u66f4\u9ebb\u70e6\u7684\u95ee\u9898\u3002\u300d<\/p>\n

    \u66f4\u6539\u4e3a\u4e0d\u5ffd\u7565\u5927\u5c0f\u5199<\/p>\n

    \r\n[core] \r\n  ignorecase = false \r\n<\/pre>\n

    \u4ee5\u4e0b\u662f\u4ea7\u751f\u7684\u95ee\u9898\uff1a<\/p>\n

      \n\u300c\u4fee\u6539\u6587\u4ef6\u540d\u65f6\uff0cGit \u5de5\u4f5c\u533a\u4e2d\u4e00\u4e0b\u5b50\u589e\u52a0\u4e86\u4e24\u4e2a\u6587\u4ef6\uff0c\u5e76\u4e14\u65e0\u6cd5\u5220\u9664\u300d
      \n\u300cgit rm \u5220\u9664\u6587\u4ef6\u65f6\uff0c\u5de5\u4f5c\u533a\u7684\u4e24\u4e2a\u6587\u4ef6\u90fd\u88ab\u5220\u9664\u300d<\/ol>\n
      \r\n~\/Documents\/ignorecase-test(master ✔) ls \r\ntest \r\n~\/Documents\/ignorecase-test(master ✔) mv test Test \r\n~\/Documents\/ignorecase-test(master \u2717) ls \r\nTest \r\n~\/Documents\/ignorecase-test(master \u2717) git status \r\nOn branch master \r\nUntracked files: \r\n  (use \"git add ...\" to include in what will be committed) \r\n        Test \r\n \r\nnothing added to commit but untracked files present (use \"git add\" to track) \r\n~\/Documents\/ignorecase-test(master \u2717) git add -A \r\n~\/Documents\/ignorecase-test(master \u2717) git ls-files \r\nTest \r\ntest \r\n~\/Documents\/ignorecase-test(master \u2717) git rm test \r\nrm 'test' \r\n~\/Documents\/ignorecase-test(master \u2717) git add -A \r\n~\/Documents\/ignorecase-test(master \u2717) git ls-files \r\n~\/Documents\/ignorecase-test(master \u2717) \r\n<\/file><\/pre>\n
      \u603b\u7ed3<\/strong><\/div>\n

      \u4f7f\u7528 git mv -f \u548c mv \u540c\u65f6\u66f4\u6539\u6587\u4ef6\u540d\uff0c\u907f\u514d\u672c\u5730\u6587\u4ef6\u7cfb\u7edf\u4e0e\u4ed3\u5e93\u4e2d\u4ee3\u7801\u4e0d\u4e00\u81f4\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

      \u4e00\u822c\u5f00\u53d1\u4e2d\u5728 Mac \u4e0a\u5f00\u53d1\u7a0b\u5e8f\uff0c\u5e76\u4f7f\u7528 Git \u8fdb\u884c\u7248\u672c\u7ba1\u7406\uff0c\u5728\u4f7f\u7528 React \u7f16\u5199 Component […]<\/p>\n","protected":false},"author":370,"featured_media":95067,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-207713","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\/207713","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\/370"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=207713"}],"version-history":[{"count":4,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/207713\/revisions"}],"predecessor-version":[{"id":207860,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/207713\/revisions\/207860"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/95067"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=207713"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=207713"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=207713"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}