{"id":111496,"date":"2024-12-16T22:42:10","date_gmt":"2024-12-16T14:42:10","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=111496"},"modified":"2024-12-16T22:42:10","modified_gmt":"2024-12-16T14:42:10","slug":"git-2-18-git-v2","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/git-2-18-git-v2.html","title":{"rendered":"Git 2.18\u7248\u672c\u53d1\u5e03\uff1a\u652f\u6301Git\u534f\u8baev2\uff0c\u63d0\u5347\u6027\u80fd"},"content":{"rendered":"
\u5bfc\u8bfb<\/td>\n | \u5728\u6700\u65b0\u7684\u5b98\u65b9 Git \u5ba2\u6237\u7aef\u6b63\u5f0f\u72482.18\u4e2d\u6dfb\u52a0\u4e86\u5bf9 Git wire \u534f\u8bae v2 \u7684\u652f\u6301\uff0c\u5e76\u5f15\u5165\u4e86\u4e00\u4e9b\u6027\u80fd\u4e0e UI \u6539\u8fdb\u7684\u65b0\u7279\u6027\u3002\u5728 Git \u7684\u6838\u5fc3\u56e2\u961f\u6210\u5458 Brandon Williams \u516c\u5f00\u5ba3\u5e03\u8fd9\u4e00\u6d88\u606f\u524d\u51e0\u5468\uff0cGit \u534f\u8bae v2 \u521a\u521a\u5408\u5e76\u81f3 Git \u7684 master \u4e3b\u5e72\u5206\u652f\u3002Git wire \u534f\u8bae\u5b9a\u4e49\u4e86 Git \u5ba2\u6237\u7aef\u4e0e\u670d\u52a1\u7aef\u5982\u4f55\u5bf9\u4e8e clone\u3001fetch \u548c push \u7b49\u64cd\u4f5c\u8fdb\u884c\u901a\u4fe1\u3002\u6309 Williams \u6240\u8bf4\uff0c\u65b0\u7248\u672c\u534f\u8bae\u7684\u76ee\u6807\u662f\u63d0\u5347\u6027\u80fd\uff0c\u5e76\u4f7f\u5176\u80fd\u591f\u66f4\u597d\u7684\u9002\u5e94\u672a\u6765\u7684\u6539\u8fdb\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n <\/p>\n \u65b0\u7248\u672c\u534f\u8bae\u7684\u4e3b\u8981\u9a71\u52a8\u529b\u662f\u4f7f Git \u670d\u52a1\u7aef\u80fd\u591f\u5bf9\u5404\u79cd ref\uff08\u5206\u652f\u4e0e tag\uff09\u8fdb\u884c\u8fc7\u6ee4\u64cd\u4f5c\u3002<\/p>\n \u8fd9\u5c31\u610f\u5473\u7740\uff0cGit \u670d\u52a1\u5668\u65e0\u9700\u5c06\u4ee3\u7801\u5e93\u4e2d\u6240\u6709\u7684 ref \u4e00\u6b21\u6027\u53d1\u9001\u7ed9\u5ba2\u6237\u7aef\uff0c\u518d\u7531\u5ba2\u6237\u7aef\u8fdb\u884c\u8fc7\u6ee4\u3002\u5728\u5927\u578b\u7684\u4ee3\u7801\u5e93\u4e2d\u53ef\u80fd\u4f1a\u5b58\u5728\u4e0d\u8ba1\u5176\u6570\u7684 ref\uff0c\u5373\u4f7f\u67d0\u4e9b ref \u662f\u5ba2\u6237\u7aef\u65e0\u9700\u4f7f\u7528\u7684\uff0c\u4e5f\u4e0d\u5f97\u4e0d\u52a0\u8f7d\u591a\u8fbe\u6570\u4e2a MB \u7684 ref \u6570\u636e\u3002\u5728\u4f7f\u7528 v2 \u534f\u8bae\u4e4b\u540e\uff0cGit \u670d\u52a1\u5668\u5c06\u6839\u636e\u5ba2\u6237\u7aef\u6240\u9700\u7684\u64cd\u4f5c\u7c7b\u578b\uff0c\u5bf9 ref \u8fdb\u884c\u8fc7\u6ee4\u4e4b\u540e\u518d\u5c06\u5217\u8868\u53d1\u9001\u81f3\u5ba2\u6237\u7aef\u3002Williams \u4e3e\u4e86\u4e00\u4e2a\u4f8b\u5b50\uff0c\u5982\u679c\u5f00\u53d1\u8005\u6240\u66f4\u65b0\u7684\u5206\u652f\u4ec5\u6bd4\u5176\u8fdc\u7a0b\u5206\u652f\u843d\u540e\u51e0\u4e2a\u63d0\u4ea4\uff0c\u6216\u662f\u4ec5\u4ec5\u68c0\u67e5\u672c\u5730\u5206\u652f\u662f\u5426\u5df2\u66f4\u65b0\uff0c\u5219\u5b8c\u5168\u6ca1\u6709\u5fc5\u8981\u5728\u670d\u52a1\u7aef\u4f20\u9012\u6574\u4e2a ref \u5217\u8868\uff0c\u8fd9\u5bf9\u4e8e\u65f6\u95f4\u548c\u5e26\u5bbd\u90fd\u662f\u4e00\u79cd\u6d6a\u8d39\u3002Williams \u8868\u793a\uff0c\u57fa\u4e8e Google \u5185\u90e8\u5bf9\u534f\u8bae v2\u7684\u4f7f\u7528\uff0c\u5728\u8bbf\u95ee\u4f8b\u5982 Chrome \u8fd9\u79cd\u5305\u542b\u4e86\u8d85\u8fc750\u4e07\u4e2a\u5206\u652f\u548c tag \u7684\u5927\u578b\u4ed3\u5e93\u65f6\uff0c\u6bd4\u8d77\u4f7f\u7528 v1 \u534f\u8bae\u53ef\u8fbe\u5230\u4e09\u500d\u901f\u4ee5\u4e0a\u3002\u6b64\u5916\uff0c\u901a\u8fc7\u4f7f\u7528\u65b0\u7248\u672c\u534f\u8bae\uff0c\u66f4\u4fbf\u4e8e\u5b9e\u73b0\u67d0\u4e9b\u65b0\u7684\u7279\u6027\uff0c\u4f8b\u5982\u6309\u9700\u9009\u53d6 ref\uff0c\u4ee5\u53ca\u62c9\u53d6\u548c\u63a8\u9001 symref \u7b49\u7b49\u3002<\/p>\n \u652f\u6301\u534f\u8bae v2 \u7684 Git \u5ba2\u6237\u7aef\u4ecd\u7136\u53ef\u4ee5\u4e0e\u5c1a\u672a\u652f\u6301 v2 \u7684\u65e7\u7248\u672c\u670d\u52a1\u7aef\u8fdb\u884c\u901a\u4fe1\u3002\u8fd9\u8981\u611f\u8c22\u5f53\u521d\u5728\u8bbe\u8ba1\u65f6\u51b3\u5b9a\u901a\u8fc7\u4e00\u4e2a\u72ec\u7acb\u7684\u901a\u9053\u53d1\u9001 v2 \u6240\u5fc5\u987b\u7684\u989d\u5916\u4fe1\u606f\u3002\u65e7\u7248\u672c\u7684\u670d\u52a1\u7aef\u4f1a\u76f4\u63a5\u5ffd\u7565\u8fd9\u4e2a\u989d\u5916\u7684\u901a\u9053\uff0c\u5e76\u8fd4\u56de ref \u7684\u5b8c\u6574\u5217\u8868\u3002<\/p>\n \u4e3a\u4e86\u8ba9\u5f00\u53d1\u8005\u80fd\u591f\u81ea\u884c\u9009\u62e9\u534f\u8bae\u7684\u7248\u672c\uff0cGit \u73b0\u5728\u6dfb\u52a0\u4e86\u4e00\u4e2a\u65b0\u7684 -c \u547d\u4ee4\u884c\u9009\u9879\uff0c\u5982\u4ee5\u4e0b\u793a\u4f8b\uff1a<\/p>\n git -c protocol.version=2 ls-remote<\/pre>\n |