{"id":37699,"date":"2023-08-01T02:42:44","date_gmt":"2023-07-12T16:24:20","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8e-git-2-27-%e7%89%88%e6%9c%ac%e4%b8%ad-git-pull-%e6%97%b6%e7%9a%84%e8%ad%a6%e5%91%8a\/"},"modified":"2024-04-30T16:23:56","modified_gmt":"2024-04-30T08:23:56","slug":"%e5%85%b3%e4%ba%8e-git-2-27-%e7%89%88%e6%9c%ac%e4%b8%ad-git-pull-%e6%97%b6%e7%9a%84%e8%ad%a6%e5%91%8a","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8e-git-2-27-%e7%89%88%e6%9c%ac%e4%b8%ad-git-pull-%e6%97%b6%e7%9a%84%e8%ad%a6%e5%91%8a\/","title":{"rendered":"\u5173\u4e8e Git 2.27 \u7248\u672c\u4e2d git pull \u65f6\u7684\u8b66\u544a"},"content":{"rendered":"<h2>\u7b80\u8ff0<\/h2>\n<p>\u6700\u8fd1\u53d1\u73b0\uff0c\u5728\u5347\u7ea7\u4e86Git\u7248\u672c\u540e\uff0c\u6bcf\u6b21\u6267\u884cgit pull\u65f6\u90fd\u4f1a\u51fa\u73b0\u4ee5\u4e0b\u8b66\u544a\u3002<\/p>\n<pre class=\"post-pre\"><code>warning: Pulling without specifying how to reconcile divergent branches is\r\ndiscouraged. You can squelch this message by running one of the following\r\ncommands sometime before your next pull:\r\n\r\n  git config pull.rebase false  # merge (the default strategy)\r\n  git config pull.rebase true   # rebase\r\n  git config pull.ff only       # fast-forward only\r\n\r\nYou can replace \"git config\" with \"git config --global\" to set a default\r\npreference for all repositories. You can also pass --rebase, --no-rebase,\r\nor --ff-only on the command line to override the configured default per\r\ninvocation.\r\n<\/code><\/pre>\n<p>\u65e9\u665a\u8981\u597d\u597d\u5904\u7406\u8fd9\u4ef6\u4e8b\u60c5\uff0c\u53ef\u65f6\u95f4\u5df2\u7ecf\u8fc7\u53bb\u4e86\uff0c\u6240\u4ee5\u73b0\u5728\u6211\u4f1a\u8ba4\u771f\u5bf9\u5f85\u3002<\/p>\n<p>\u6839\u636e\u641c\u7d22\u7ed3\u679c\u663e\u793a\uff0c\u8fd9\u6761\u6d88\u606f\u4f3c\u4e4e\u662f\u5728 Git 2.27.0 \u7248\u672c\u4e2d\u5f15\u5165\u7684\u3002<br \/>\n\u6b63\u5982\u6d88\u606f\u6240\u8ff0\uff0c\u53ea\u8981\u5b9e\u65bd\u4ee5\u4e0b\u4e09\u4e2a\u8bbe\u5b9a\u4e4b\u4e00\uff0c\u8b66\u544a\u5c31\u4f1a\u6d88\u5931\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">git config pull.rebase false<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">git config pull.rebase true<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">git config pull.ff only<\/ul>\n<p>\u7279\u522b\u662f\uff0c\u5982\u679c\u60a8\u5bf9\u4ee5\u524d\u7684\u64cd\u4f5c\u6ca1\u6709\u4efb\u4f55\u4e0d\u6ee1\uff0c\u60a8\u53ef\u4ee5\u8fd0\u884cgit config &#8211;global pull.rebase false\uff0c\u8fd9\u6837\u4ee5\u524d\u7684\u884c\u4e3a\u5c06\u4fdd\u6301\u4e0d\u53d8\uff0c\u5e76\u4e14\u53ea\u4f1a\u6d88\u9664\u8b66\u544a\u3002<\/p>\n<p>\u55ef\uff0c\u53cd\u6b63\u5462\uff0c\u65e2\u7136\u6709\u8fd9\u4e2a\u673a\u4f1a\uff0c\u5c31\u501f\u6b64\u56de\u987e\u4e00\u4e0b\uff0c\u8fdb\u4e00\u6b65\u52a0\u6df1\u7406\u89e3\u5427\u3002<\/p>\n<h2>\u7406\u89e3 git merge \u7684\u9009\u62e9<\/h2>\n<p>git pull \u5728\u57fa\u672c\u4e0a\u662f\u5c06\u8fdc\u7a0b\u5206\u652f\u5408\u5e76\u5230\u672c\u5730\u5206\u652f\u7684\u64cd\u4f5c\u3002<\/p>\n<p>Git\u5408\u5e76\u7684\u7b56\u7565\u6709\u4ee5\u4e0b\u4e24\u79cd\u3002<\/p>\n<p>merge commit \u3092\u4f5c\u6210 (3-way merge \u304c\u884c\u308f\u308c\u308b)<br \/>\n(\u5fc5\u8981\u306a\u3089 merge \u5bfe\u8c61\u306e\u30d6\u30e9\u30f3\u30c1\u3092 rebase \u3057\u305f\u4e0a\u3067\u306e) fast-forward (merge commit \u3092\u4f5c\u6210\u3057\u306a\u3044)<\/p>\n<p>\u6bd4\u5982\u8bf4\uff0c\u5047\u8bbe\u5728\u63d0\u4ea4 a \u4e4b\u540e\uff0c\u4e3b\u5206\u652f\uff08main branch\uff09\u548c\u5f00\u53d1\u5206\u652f\uff08develop\uff09\u4ea7\u751f\u4e86\u5206\u53c9\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d2ff537434c4406c5a31f\/13-0.png\" alt=\"git_merge_base.png\" \/><\/div>\n<p>\u5728\u8fdb\u884c\u5408\u5e76\u63d0\u4ea4\u65f6\uff0c\u6bcf\u4e2a\u5206\u652f\u7684\u5386\u53f2\u8bb0\u5f55\u5c06\u4fdd\u6301\u4e0d\u53d8\uff0c\u540c\u65f6\u4f1a\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u5408\u5e76\u63d0\u4ea4m\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d2ff537434c4406c5a31f\/15-0.png\" alt=\"git_merge_merge_commit.png\" \/><\/div>\n<p>\u5982\u679c\u8981\u6267\u884c\u5feb\u901f\u5408\u5e76\uff0c\u90a3\u4e48\u5c31\u610f\u5473\u7740\u4e0d\u9700\u521b\u5efa\u5408\u5e76\u63d0\u4ea4\uff0c\u56e0\u6b64main\u5206\u652f\u5728develop\u5206\u5c90\u4e4b\u540e\u4e0d\u80fd\u6709\u4efb\u4f55\u63d0\u4ea4\u3002\uff08\u4e5f\u5c31\u662f\u8bf4\uff0c\u5982\u679cmain\u5206\u652f\u4ecd\u7136\u505c\u7559\u5728\u63d0\u4ea4a\u7684\u72b6\u6001\uff0c\u90a3\u4e48\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\u5feb\u901f\u5408\u5e76\u5c06develop\u5408\u5e76\u8fdb\u53bb\u3002\uff09<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d2ff537434c4406c5a31f\/17-0.png\" alt=\"git_merge_base_simple.png\" \/><\/div>\n<p>\u5982\u679c\u4e0d\u662f\u8fd9\u6837\u7684\u60c5\u51b5\uff0c\u9996\u5148\u8981\u5c06develop\u91cd\u65b0\u57fa\u4e8emain\u7684HEAD\u63d0\u4ea4d\u8fdb\u884c\u53d8\u66f4(rebase)\uff0c\u4f7fdevelop\u7684\u5206\u652f\u6e90\u5934\u6210\u4e3acommit d\u3002<br \/>\ndevelop\u5206\u652f\u4e2d\u7684\u6240\u6709\u63d0\u4ea4\u90fd\u5c06\u53d8\u4e3a\u4e0e\u539f\u59cb\u63d0\u4ea4\u4e0d\u540c\u7684e&#8217;\u3001f&#8217;\u3001g&#8217;\u3002<br \/>\n\u7531\u4e8e\u8fd9\u6837\u4f1a\u4fee\u6539\u5386\u53f2\u8bb0\u5f55\uff0c\u8bf7\u6ce8\u610f\u53ef\u80fd\u51fa\u73b0\u7684\u51b2\u7a81\u3002<br \/>\n\u6b64\u5916\uff0c\u5728Git\u4e0a\u5373\u4f7f\u6ca1\u6709\u51b2\u7a81\uff0c\u4ece\u4ee3\u7801\u7684\u610f\u4e49\u548c\u5b9e\u9645\u64cd\u4f5c\u4e0a\u4e5f\u53ef\u80fd\u51fa\u73b0\u51b2\u7a81\uff0c\u56e0\u6b64\u4e00\u5b9a\u8981\u8fdb\u884c\u6d4b\u8bd5\u3002\uff08\u8fd9\u4e00\u70b9\u5728\u521b\u5efa\u5408\u5e76\u63d0\u4ea4\u65f6\u4e5f\u662f\u4e00\u6837\u7684\u3002\uff09<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d2ff537434c4406c5a31f\/19-0.png\" alt=\"git_merge_fast_forward_1.png\" \/><\/div>\n<p>\u7136\u540e\u8fdb\u884c\u5feb\u8fdb\u64cd\u4f5c\u3002\u8fd9\u53ea\u662f\u5c06\u4e3b\u5206\u652f\u7684HEAD\u79fb\u52a8\u5230\u63d0\u4ea4g&#8217;\u3002\u8fd9\u6837\u5728\u5386\u53f2\u4e0a\u5c31\u6210\u4e86\u4e00\u6761\u76f4\u7ebf\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d2ff537434c4406c5a31f\/21-0.png\" alt=\"git_merge_fast_forward_2.png\" \/><\/div>\n<h2>\u5bf9\u4e8e git pull \u64cd\u4f5c\u7684\u9009\u62e9\u7406\u89e3<\/h2>\n<p>\u597d\u7684\uff0c\u90a3\u4e48\u5728\u6b64\u4e4b\u524d\uff0c\u6211\u60f3\u5148\u8003\u8651\u4e00\u4e0b\u89e3\u51b3\u521a\u624d\u7684\u8b66\u544a\u7684\u4e09\u4e2a\u9009\u62e9\u3002\u4f46\u5728\u6b64\u4e4b\u524d\uff0c\u8ba9\u6211\u4eec\u786e\u8ba4\u4e00\u4e0b git pull \u7684 &#8211;rebase \u9009\u9879\u3002<br \/>\n\u5982\u679c\u4e0d\u6307\u5b9a\u4efb\u4f55\u53c2\u6570\uff0c\u4e0e &#8211;rebase false \u76f8\u540c\uff0c\u8fd9\u662f\u9ed8\u8ba4\u64cd\u4f5c\u3002\u5982\u679c\u6307\u5b9a\u4e86 &#8211;rebase\uff0c\u5219\u4e0e &#8211;rebase true \u76f8\u540c\u3002<br \/>\n\u8fd8\u6709\u5176\u4ed6\u7528\u4e8e\u7cbe\u7ec6\u63a7\u5236 rebase \u884c\u4e3a\u7684\u9009\u9879\uff0c\u4f8b\u5982 &#8211;rebase merges\u3001 &#8211;rebase preserve\u3001 &#8211;rebase interactive\uff0c\u4f46\u8fd9\u91cc\u5c31\u4e0d\u63d0\u4e86\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d2ff537434c4406c5a31f\/24-0.png\" alt=\"git_pull_base.png\" \/><\/div>\n<p>\u4e00\u822c\u60c5\u51b5\u4e0b\uff0c\u6267\u884cgit pull\uff08\u4e0d\u52a0&#8211;rebase\u53c2\u6570\uff09\u4f1a\u5148\u6267\u884cgit fetch\uff0c\u7136\u540e\u518d\u6267\u884cgit merge\u3002<br \/>\n\u5728\u9ed8\u8ba4\u8bbe\u7f6e\u4e0b\uff0c\u5982\u679c\u53ef\u4ee5\u8fdb\u884c\u5feb\u901f\u5408\u5e76\uff08fast-forward\uff09\uff0c\u5219\u4f1a\u8fdb\u884c\u5feb\u901f\u5408\u5e76\uff1b\u5982\u679c\u4e0d\u80fd\u8fdb\u884c\u5feb\u901f\u5408\u5e76\uff0c\u5c31\u4f1a\u50cf\u4e4b\u524d\u7684\u793a\u610f\u56fe\u90a3\u6837\u751f\u6210\u5408\u5e76\u63d0\u4ea4\uff08merge commit\uff09\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d2ff537434c4406c5a31f\/26-0.png\" alt=\"git_pull_merge.png\" \/><\/div>\n<p>\u5bf9\u6b64\uff0c\u6267\u884c git pull &#8211;rebase \u547d\u4ee4\u65f6\uff0c\u5148\u6267\u884c git fetch \u547d\u4ee4\uff0c\u7136\u540e\u5728\u672c\u5730\u5206\u652f\uff08\u6b64\u793a\u4f8b\u4e2d\u4e3a\u4e3b\u5206\u652f\uff09\u6267\u884c git rebase \u547d\u4ee4\u3002<br \/>\n\u5728\u4e0a\u8ff0 fast-forward \u5408\u5e76\u7684\u8bf4\u660e\u4e2d\uff0c\u6211\u4eec\u6267\u884c\u4e86 develop \u5206\u652f\u7684 rebase \u64cd\u4f5c\uff0c\u7136\u540e\u6267\u884c\u4e86 fast-forward \u64cd\u4f5c\uff0c\u4f46\u8bf7\u6ce8\u610f\uff0c\u6b64\u5904\u6267\u884c\u7684\u662f\u4e3b\u5206\u652f\u7684 rebase \u64cd\u4f5c\u3002\uff08\u5c3d\u7ba1 main &#8211; develop \u7684\u5173\u7cfb\u53d8\u6210\u4e86 origin\/main &#8211; main \u7684\u5173\u7cfb\uff0c\u4f46\u672c\u8d28\u4e0a\u8fd8\u662f\u76f8\u540c\u7684\u4e8b\u60c5\u3002\uff09<\/p>\n<p>\u901a\u8fc7\u8fd9\u6837\u505a\uff0c\u4e0d\u4f1a\u5bf9\u8fdc\u7a0b\u5206\u652f\u4ea7\u751f\u4efb\u4f55\u5f71\u54cd\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d2ff537434c4406c5a31f\/29-0.png\" alt=\"git_pull_rebase_1.png\" \/><\/div>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d2ff537434c4406c5a31f\/30-0.png\" alt=\"git_pull_rebase_2.png\" \/><\/div>\n<p>\u5173\u4e8egit pull\u547d\u4ee4\u7684&#8211;rebase\u9009\u9879\u7684\u4f7f\u7528\u573a\u666f\u6709\u4e3b\u8981\u4ee5\u4e0b\u4e24\u79cd\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u540c\u4e00\u30d6\u30e9\u30f3\u30c1\u306b\u5bfe\u3057\u3066\u3001\u8907\u6570\u4eba\u304c\u540c\u6642\u4e26\u884c\u3067\u958b\u767a\u3092\u884c\u3046\u5834\u5408<\/ul>\n<\/li>\n<\/ul>\n<p>\u30ed\u30fc\u30ab\u30eb\u30d6\u30e9\u30f3\u30c1\u3092 rebase \u3057\u305f\u4e0a\u3067 push \u3059\u308b\u3053\u3068\u3067\u3001 merge commit \u304c\u4e71\u7acb\u3059\u308b\u3053\u3068\u3092\u9632\u3050\u3053\u3068\u304c\u3067\u304d\u307e\u3059<\/p>\n<p>Pull Request \u30de\u30fc\u30b8\u524d\u306b\u3001\u30de\u30fc\u30b8\u5148\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u30d6\u30e9\u30f3\u30c1\u3092\u53d6\u308a\u8fbc\u3093\u3067\u3001\u30c6\u30b9\u30c8\u306a\u3069\u3092\u884c\u3046\u5834\u5408<\/p>\n<p>\u4f8b\u3048\u3070\u3001 Pull Request \u306e feature \u30d6\u30e9\u30f3\u30c1\u306b\u30de\u30fc\u30b8\u5148\u3067\u3042\u308b main \u30d6\u30e9\u30f3\u30c1\u3092\u3042\u3089\u304b\u3058\u3081\u30de\u30fc\u30b8\u3057\u3066\u3082\u3001 feature \u30d6\u30e9\u30f3\u30c1\u306b\u306f merge commit \u304c\u4f5c\u3089\u308c\u305a\u306b\u6e08\u307f\u307e\u3059 (\u7d50\u679c\u7684\u306b\u5c65\u6b74\u304c\u7dba\u9e97\u306b\u306a\u308a\u307e\u3059)<\/p>\n<p>\u6211\u4e5f\u4f1a\u67e5\u770b\u4e0e git pull \u7684 fast-forward \u76f8\u5173\u7684\u4ee5\u4e0b\u4e09\u4e2a\u9009\u9879\u3002 \uff08git merge \u4e5f\u6709\u5b8c\u5168\u76f8\u540c\u7684\u9009\u9879\uff09<br \/>\n\u6211\u5c06\u5728\u4e0b\u8868\u4e2d\u603b\u7ed3\u5982\u4e0b\u3002 \uff08\u9ed8\u8ba4\u9009\u9879\u4e3a &#8211;ff\uff09<\/p>\n<div>\n<div class=\"post-table\">optionfast-forward \u53ef\u80fd\u306a\u5834\u5408fast-forward \u3067\u304d\u306a\u3044\u5834\u5408<code>--ff<\/code>fast-forward \u3067 merge \u3059\u308bmerge commit \u3092\u751f\u6210\u3059\u308b<code>--no-ff<\/code>merge commit \u3092\u751f\u6210\u3059\u308bmerge commit \u3092\u751f\u6210\u3059\u308b<code>--ff-only<\/code>fast-forward \u3067 merge \u3059\u308bmerge \u305b\u305a\u3001\u30a8\u30e9\u30fc\u7d42\u4e86\u3059\u308b<\/div>\n<\/div>\n<h2>\u5982\u679c\u5206\u522b\u9009\u62e9\u524d\u9762\u7684\u4e09\u4e2a\u9009\u9879\u5f8c\u7684\u884c\u4e3a<\/h2>\n<p>\u5f53\u8fbe\u5230\u8fd9\u4e00\u70b9\u65f6\uff0c\u5728\u6ca1\u6709\u9644\u52a0\u9009\u9879\u7684\u60c5\u51b5\u4e0b\u6267\u884cgit pull\uff0c\u6211\u4eec\u53ef\u4ee5\u4e86\u89e3\u5230Git\u8981\u6c42\u4ee5\u4e0b\u5176\u4e2d\u4e00\u9879\u3002<\/p>\n<h3>\u8bf7\u5c06git\u914d\u7f6epull.rebase\u8bbe\u7f6e\u4e3afalse\u3002<\/h3>\n<p>\u8fd9\u662f\u9ed8\u8ba4\u7684\u884c\u4e3a\u3002\u6267\u884cgit pull\u800c\u6ca1\u6709\u6dfb\u52a0&#8211;rebase\u9009\u9879\u7684\u6548\u679c\u4e0e\u6ca1\u6709\u6267\u884c&#8211;rebase\u7684git pull\u76f8\u540c\u3002\u5728\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u5982\u679c\u53ef\u4ee5\u8fdb\u884cfast-forward\u64cd\u4f5c\uff0c\u5b83\u5c06\u6267\u884cfast-forward\u64cd\u4f5c\uff0c\u5426\u5219\u5c06\u5c1d\u8bd5\u751f\u6210\u5408\u5e76\u63d0\u4ea4\u3002<\/p>\n<h3>\u5c06git\u914d\u7f6epull.rebase\u8bbe\u7f6e\u4e3atrue\u3002<\/h3>\n<p>\u8fdb\u884c git pull &#8211;rebase \u7684\u6548\u679c\u4e0e\u8fdb\u884c git fetch \u540e\u518d\u5bf9\u672c\u5730\u5206\u652f\u8fdb\u884c rebase \u662f\u76f8\u540c\u7684\uff0c\u56e0\u6b64\u53ef\u4ee5\u4fdd\u8bc1\u63d0\u4ea4\u5386\u53f2\u5448\u76f4\u7ebf\u6392\u5217\uff0c\u800c\u4e0d\u4f1a\u521b\u5efa\u5408\u5e76\u63d0\u4ea4\u3002<\/p>\n<h3>\u53ea\u9700\u8981git config pull.ff\u3002<\/h3>\n<p>\u53ea\u6709\u5728\u4f7f\u7528\u4e86&#8211;ff-only\u9009\u9879\u65f6\uff0c\u5e76\u4e14\u53ef\u4ee5\u8fdb\u884c\u5feb\u901f\u524d\u8fdb\u65f6\uff0c\u624d\u4f1a\u8fdb\u884c\u5feb\u901f\u524d\u8fdb\u3002<br \/>\n\u5426\u5219\uff0c\u4e0d\u8fdb\u884c\u5408\u5e76\/\u53d8\u57fa\u64cd\u4f5c\uff0c\u5e76\u4ee5\u9519\u8bef\u7684\u65b9\u5f0f\u7ec8\u6b62\u3002<\/p>\n<h2>\u6700\u540e\u7ed3\u679c<\/h2>\n<p>\u57fa\u672c\u4e0a\uff0c\u6211\u8a8d\u70ba\u5408\u4f75\/\u62c9\u5165\u7b56\u7565\u662f\u7531\u6bcf\u500b\u5718\u968a\u7684\u65b9\u91dd\u800c\u5b9a\u7684\u3002\u4ee5\u6211\u7684\u89c0\u9ede\uff0c\u6700\u597d\u662f\u5728\u5718\u968a\u5167\u90e8\u9054\u6210\u4e00\u81f4\uff0c\u9019\u6a23\u5728\u67e5\u770b Git \u6b77\u53f2\u6642\u8f03\u5bb9\u6613\u64cd\u4f5c\u3002\u7136\u800c\uff0c\u7576\u4eba\u6578\u589e\u52a0\u6642\uff0c\u9019\u4e00\u9ede\u53ef\u80fd\u8b8a\u5f97\u66f4\u52a0\u56f0\u96e3\u3002<\/p>\n<p>\u5408\u5e76\/\u62c9\u53d6\u7684\u7b56\u7565\u662f\u5173\u4e8e\u5982\u4f55\u6574\u5408\u4ee3\u7801\u5386\u53f2\u8bb0\u5f55\u7684\u8ba8\u8bba\uff0c\u5bf9\u5f53\u524d\u7684\u5feb\u7167\u6ca1\u6709\u7279\u522b\u5f71\u54cd\u3002\uff08\u5728Git\u64cd\u4f5c\u4e2d\u53ef\u80fd\u4f1a\u9047\u5230\u95ee\u9898\uff0c\u4f46\u5f71\u54cd\u53ef\u80fd\u4e0d\u5927\uff09<br \/>\n\u7531\u4e8e\u6ca1\u6709\u7279\u522b\u4e25\u91cd\u7684\u95ee\u9898\uff0c\u6240\u4ee5\u603b\u7684\u6765\u8bf4\uff0c\u5f53\u9047\u5230\u56f0\u60d1\u65f6\uff0c\u6700\u597d\u4fdd\u6301\u9ed8\u8ba4\u8bbe\u7f6e?<\/p>\n<blockquote><p>\u53c2\u8003\u8d44\u6599<\/p><\/blockquote>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">https:\/\/raw.githubusercontent.com\/git\/git\/master\/Documentation\/RelNotes\/2.27.0.txt<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">How to deal with this git warning? &#8220;Pulling without specifying how to reconcile divergent branches is discouraged&#8221; &#8211; Stack Overflow<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Why You Should Use git pull &#8211;ff-only | sffc&#8217;s Tech Blog<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30aa\u30d7\u30b7\u30e7\u30f3\u306a\u3057 git pull \u3067\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u6319\u52d5\u304c\u672a\u8a2d\u5b9a\u3060\u3068\u8b66\u544a\u304c\u51fa\u308b &#8211; Qiita<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Git 2.27.0 \u304b\u3089 git pull \u3092\u3059\u308b\u3068\u8868\u793a\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u3063\u305f &#8220;Pulling without specifying how to reconcile divergent branches is discouraged.&#8221; \u306b\u3064\u3044\u3066 &#8211; esm \u30a2\u30b8\u30e3\u30a4\u30eb\u4e8b\u696d\u90e8 \u958b\u767a\u8005\u30d6\u30ed\u30b0<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">git pull \u30a8\u30e9\u30fc &#8220;Pulling without specifying how to reconcile divergent branches is discouraged.&#8221; | \u30cf\u30c3\u30af\u30ce\u30fc\u30c8<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30d6\u30e9\u30f3\u30c1\u306e\u7d71\u5408\uff5c\u30b5\u30eb\u5148\u751f\u306eGit\u5165\u9580\u3010\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u7ba1\u7406\u30c4\u30fc\u30ebBacklog\u3011<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Git &#8211; git-merge Documentation<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Git &#8211; git-pull Documentation<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Git &#8211; git-config Documentation<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Git &#8211; \u30ea\u30d9\u30fc\u30b9<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">fast-forward\u30de\u30fc\u30b8\u304b\u3089\u7406\u89e3\u3059\u308bgit rebase &#8211; Qiita<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Git \u306e\u30d5\u30a1\u30b9\u30c8\u30d5\u30a9\u30ef\u30fc\u30c9\u30de\u30fc\u30b8\u3068\u306f &#8211; yu8mada<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Git fast-forward \u306a\u72b6\u614b\u306b\u3057\u3066 update branch \u3067 master \u3092\u53d6\u308a\u8fbc\u3093\u3060 commit \u3092\u6b8b\u3055\u305a\u306b\u6e08\u3080\u305f\u3081\u306e git rebase &#8211; \u304b\u3082\u30e1\u30e2<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">git pull \u3068 git pull \u2013rebase \u306e\u9055\u3044\u3063\u3066\uff1f\u56f3\u3092\u4ea4\u3048\u3066\u8aac\u660e\u3057\u307e\u3059\uff01 \u2013 KRAY Inc.<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">3-way merge\u306b\u3064\u3044\u3066\u8abf\u3079\u305f &#8211; Qiita<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Github\u3067\u306eWeb\u4e0a\u304b\u3089\u306e\u30de\u30fc\u30b8\u306e\u4ed5\u65b93\u7a2e\u3068\u305d\u306e\u4f7f\u3044\u3069\u3053\u308d &#8211; Qiita<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u4f55\u6545 git rebase \u306f\u99c4\u76ee\u3067 git pull \u2013rebase \u306f\u3044\u3044\u306e\u304b \u00ab LANCARD.LAB\uff5c\u30e9\u30f3\u30ab\u30fc\u30c9\u30b3\u30e0\u306e\u30b9\u30bf\u30c3\u30d5\u30d6\u30ed\u30b0<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u7b80\u8ff0 \u6700\u8fd1\u53d1\u73b0\uff0c\u5728\u5347\u7ea7\u4e86Git\u7248\u672c\u540e\uff0c\u6bcf\u6b21\u6267\u884cgit pull\u65f6\u90fd\u4f1a\u51fa\u73b0\u4ee5\u4e0b\u8b66\u544a\u3002 warning: Pull [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-37699","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5173\u4e8e Git 2.27 \u7248\u672c\u4e2d git pull \u65f6\u7684\u8b66\u544a - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5173\u4e8e-git-2-27-\u7248\u672c\u4e2d-git-pull-\u65f6\u7684\u8b66\u544a\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5173\u4e8e Git 2.27 \u7248\u672c\u4e2d git pull \u65f6\u7684\u8b66\u544a\" \/>\n<meta property=\"og:description\" content=\"\u7b80\u8ff0 \u6700\u8fd1\u53d1\u73b0\uff0c\u5728\u5347\u7ea7\u4e86Git\u7248\u672c\u540e\uff0c\u6bcf\u6b21\u6267\u884cgit pull\u65f6\u90fd\u4f1a\u51fa\u73b0\u4ee5\u4e0b\u8b66\u544a\u3002 warning: Pull [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5173\u4e8e-git-2-27-\u7248\u672c\u4e2d-git-pull-\u65f6\u7684\u8b66\u544a\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-12T16:24:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-30T08:23:56+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d2ff537434c4406c5a31f\/13-0.png\" \/>\n<meta name=\"author\" content=\"\u79d1, \u96c5\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u79d1, \u96c5\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8e-git-2-27-%e7%89%88%e6%9c%ac%e4%b8%ad-git-pull-%e6%97%b6%e7%9a%84%e8%ad%a6%e5%91%8a\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8e-git-2-27-%e7%89%88%e6%9c%ac%e4%b8%ad-git-pull-%e6%97%b6%e7%9a%84%e8%ad%a6%e5%91%8a\/\",\"name\":\"\u5173\u4e8e Git 2.27 \u7248\u672c\u4e2d git pull \u65f6\u7684\u8b66\u544a - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-07-12T16:24:20+00:00\",\"dateModified\":\"2024-04-30T08:23:56+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/41e222757cdd2a3365361328bd79970a\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8e-git-2-27-%e7%89%88%e6%9c%ac%e4%b8%ad-git-pull-%e6%97%b6%e7%9a%84%e8%ad%a6%e5%91%8a\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8e-git-2-27-%e7%89%88%e6%9c%ac%e4%b8%ad-git-pull-%e6%97%b6%e7%9a%84%e8%ad%a6%e5%91%8a\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8e-git-2-27-%e7%89%88%e6%9c%ac%e4%b8%ad-git-pull-%e6%97%b6%e7%9a%84%e8%ad%a6%e5%91%8a\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5173\u4e8e Git 2.27 \u7248\u672c\u4e2d git pull \u65f6\u7684\u8b66\u544a\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/41e222757cdd2a3365361328bd79970a\",\"name\":\"\u79d1, \u96c5\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1b2d3e00a7df03689797ebd4af8c5827ba5af936849a71050ec331f4cf902c5d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1b2d3e00a7df03689797ebd4af8c5827ba5af936849a71050ec331f4cf902c5d?s=96&d=mm&r=g\",\"caption\":\"\u79d1, \u96c5\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/keya\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8e-git-2-27-%e7%89%88%e6%9c%ac%e4%b8%ad-git-pull-%e6%97%b6%e7%9a%84%e8%ad%a6%e5%91%8a\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u5173\u4e8e Git 2.27 \u7248\u672c\u4e2d git pull \u65f6\u7684\u8b66\u544a - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u5173\u4e8e-git-2-27-\u7248\u672c\u4e2d-git-pull-\u65f6\u7684\u8b66\u544a\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5173\u4e8e Git 2.27 \u7248\u672c\u4e2d git pull \u65f6\u7684\u8b66\u544a","og_description":"\u7b80\u8ff0 \u6700\u8fd1\u53d1\u73b0\uff0c\u5728\u5347\u7ea7\u4e86Git\u7248\u672c\u540e\uff0c\u6bcf\u6b21\u6267\u884cgit pull\u65f6\u90fd\u4f1a\u51fa\u73b0\u4ee5\u4e0b\u8b66\u544a\u3002 warning: Pull [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u5173\u4e8e-git-2-27-\u7248\u672c\u4e2d-git-pull-\u65f6\u7684\u8b66\u544a\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-07-12T16:24:20+00:00","article_modified_time":"2024-04-30T08:23:56+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d2ff537434c4406c5a31f\/13-0.png"}],"author":"\u79d1, \u96c5","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u79d1, \u96c5","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8e-git-2-27-%e7%89%88%e6%9c%ac%e4%b8%ad-git-pull-%e6%97%b6%e7%9a%84%e8%ad%a6%e5%91%8a\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8e-git-2-27-%e7%89%88%e6%9c%ac%e4%b8%ad-git-pull-%e6%97%b6%e7%9a%84%e8%ad%a6%e5%91%8a\/","name":"\u5173\u4e8e Git 2.27 \u7248\u672c\u4e2d git pull \u65f6\u7684\u8b66\u544a - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-07-12T16:24:20+00:00","dateModified":"2024-04-30T08:23:56+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/41e222757cdd2a3365361328bd79970a"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8e-git-2-27-%e7%89%88%e6%9c%ac%e4%b8%ad-git-pull-%e6%97%b6%e7%9a%84%e8%ad%a6%e5%91%8a\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8e-git-2-27-%e7%89%88%e6%9c%ac%e4%b8%ad-git-pull-%e6%97%b6%e7%9a%84%e8%ad%a6%e5%91%8a\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8e-git-2-27-%e7%89%88%e6%9c%ac%e4%b8%ad-git-pull-%e6%97%b6%e7%9a%84%e8%ad%a6%e5%91%8a\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u5173\u4e8e Git 2.27 \u7248\u672c\u4e2d git pull \u65f6\u7684\u8b66\u544a"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/41e222757cdd2a3365361328bd79970a","name":"\u79d1, \u96c5","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/1b2d3e00a7df03689797ebd4af8c5827ba5af936849a71050ec331f4cf902c5d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1b2d3e00a7df03689797ebd4af8c5827ba5af936849a71050ec331f4cf902c5d?s=96&d=mm&r=g","caption":"\u79d1, \u96c5"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/keya\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8e-git-2-27-%e7%89%88%e6%9c%ac%e4%b8%ad-git-pull-%e6%97%b6%e7%9a%84%e8%ad%a6%e5%91%8a\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/37699","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=37699"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/37699\/revisions"}],"predecessor-version":[{"id":92984,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/37699\/revisions\/92984"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=37699"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=37699"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=37699"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}