{"id":5698,"date":"2022-03-25T20:07:50","date_gmt":"2022-03-25T12:07:50","guid":{"rendered":"https:\/\/damogame.cn:15443\/wordpress\/?p=5698"},"modified":"2022-03-25T20:07:50","modified_gmt":"2022-03-25T12:07:50","slug":"%e4%ba%86%e8%a7%a3%e7%94%a8%e4%ba%8e%e6%8c%81%e7%bb%ad%e4%ba%a4%e4%bb%98%e7%9a%84-git-%e5%88%86%e6%94%af%e6%a8%a1%e5%9e%8b","status":"publish","type":"post","link":"https:\/\/i007.cc\/wordpress\/archives\/5698","title":{"rendered":"\u4e86\u89e3\u7528\u4e8e\u6301\u7eed\u4ea4\u4ed8\u7684 Git \u5206\u652f\u6a21\u578b"},"content":{"rendered":"<p class=\"margin-right-xxl-desktop\"><a href=\"https:\/\/docs.microsoft.com\/zh-cn\/learn\/modules\/manage-git-branches-workflows\/4-explore-git-branch-model-for-continuous-delivery\">\u539f\u6587\u5730\u5740<\/a><\/p>\n<p>&nbsp;<\/p>\n<div class=\"xp-tag position-absolute top-0 right-0 margin-top-xs margin-top-sm-tablet margin-top-lg-desktop margin-top-xs-interactive margin-right-sm margin-right-lg-tablet margin-right-sm-interactive is-complete\" data-progress-uid=\"learn.wwl.manage-git-branches-workflows.explore-git-branch-model-for-continuous-delivery\">\n<div class=\"xp-tag-hexagon\"><span class=\"xp-tag-icon is-shown-complete docon docon-check\"><span class=\"visually-hidden\">\u5df2\u5b8c\u6210<\/span><\/span><span class=\"xp-tag-xp\">100 XP<\/span><\/div>\n<\/div>\n<ul class=\"metadata page-metadata\">\n<li>8 \u5206\u949f<\/li>\n<\/ul>\n<p>\u7f16\u5199\u4ee3\u7801\u7684\u76ee\u7684\u662f\u4e3a\u8f6f\u4ef6\u63d0\u4f9b\u589e\u5f3a\u529f\u80fd\u3002<\/p>\n<p>\u5f15\u5165\u8fc7\u591a\u5904\u7406\u5f00\u9500\u7684\u5206\u652f\u6a21\u578b\u5e76\u4e0d\u4f1a\u6709\u52a9\u4e8e\u63d0\u9ad8\u5411\u5ba2\u6237\u83b7\u53d6\u66f4\u6539\u7684\u901f\u5ea6\u3002<\/p>\n<p>\u8fd9\u5bf9\u4e8e\u5f00\u53d1\u5206\u652f\u6a21\u578b\u81f3\u5173\u91cd\u8981\uff0c\u56e0\u4e3a\u8fd9\u6837\u53ef\u63d0\u4f9b\u8db3\u591f\u7684\u586b\u5145\u91cf\uff0c\u800c\u4e0d\u4f1a\u4ea7\u751f\u8d28\u91cf\u8f83\u5dee\u7684\u66f4\u6539\u3002 \u4f46\u540c\u65f6\uff0c\u4e5f\u4e0d\u4f1a\u5f15\u5165\u592a\u591a\u8fdb\u7a0b\u6765\u964d\u4f4e\u901f\u5ea6\u3002<\/p>\n<p>Internet \u4e0a\u5168\u662f Git \u7684\u5206\u652f\u7b56\u7565\uff1b\u867d\u7136\u8fd9\u4e9b\u7b56\u7565\u6ca1\u6709\u5bf9\u9519\u4e4b\u5206\uff0c\u4f46\u5b8c\u7f8e\u7684\u5206\u652f\u7b56\u7565\u624d\u9002\u7528\u4e8e\u4f60\u7684\u56e2\u961f\uff01<\/p>\n<p>\u4f60\u5c06\u4e86\u89e3\u5230\u59cb\u7ec8\u4f7f\u7528\u529f\u80fd\u5206\u652f\u548c\u62c9\u53d6\u8bf7\u6c42\u7684\u7ec4\u5408\u6765\u63d0\u4f9b\u968f\u65f6\u53ef\u53d1\u5e03\u7684\u4e3b\u5206\u652f\u3002 \u8fd8\u5c06\u4e86\u89e3\uff0c\u4e3a\u907f\u514d\u56de\u5f52\uff0c\u5728\u5c06\u5931\u8d25\u5206\u652f\u8fd4\u56de\u5230\u4e3b\u5206\u652f\u7684\u4fee\u590d\u4e2d\u4fee\u590d\u7684\u540c\u6b65 bug\u3002<\/p>\n<h2 id=\"getting-ready\">\u505a\u597d\u51c6\u5907<\/h2>\n<p>\u6211\u4eec\u6765\u4ecb\u7ecd\u4e00\u4e0b\u6211\u4eec\u5efa\u8bae\u7684\u539f\u5219\uff1a<\/p>\n<ul>\n<li>\u4e3b\u5206\u652f\uff1a\n<ul>\n<li>\u4e3b\u5206\u652f\u662f\u5c06\u4efb\u4f55\u5185\u5bb9\u53d1\u5e03\u5230\u751f\u4ea7\u7684\u552f\u4e00\u65b9\u6cd5\u3002<\/li>\n<li>\u4e3b\u5206\u652f\u5e94\u59cb\u7ec8\u5904\u4e8e\u968f\u65f6\u53ef\u7528\u72b6\u6001\u3002<\/li>\n<li>\u4f7f\u7528\u5206\u652f\u7b56\u7565\u4fdd\u62a4\u4e3b\u5206\u652f\u3002<\/li>\n<li>\u5bf9\u4e3b\u5206\u652f\u8fdb\u884c\u7684\u4efb\u4f55\u66f4\u6539\u90fd\u53ea\u901a\u8fc7\u62c9\u53d6\u8bf7\u6c42\u3002<\/li>\n<li>\u7528 Git \u6807\u8bb0\u6765\u6807\u8bb0\u4e3b\u5206\u652f\u4e2d\u7684\u6240\u6709\u53d1\u5e03\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u529f\u80fd\u5206\u652f\uff1a\n<ul>\n<li>\u5c06\u529f\u80fd\u5206\u652f\u7528\u4e8e\u6240\u6709\u65b0\u529f\u80fd\u548c bug \u4fee\u590d\u3002<\/li>\n<li>\u4f7f\u7528\u529f\u80fd\u6807\u5fd7\u7ba1\u7406\u957f\u65f6\u95f4\u8fd0\u884c\u7684\u529f\u80fd\u5206\u652f\u3002<\/li>\n<li>\u4ece\u529f\u80fd\u5206\u652f\u5230\u4e3b\u5206\u652f\u7684\u66f4\u6539\u53ea\u901a\u8fc7\u62c9\u8bf7\u6c42\u3002<\/li>\n<li>\u547d\u540d\u529f\u80fd\u4ee5\u53cd\u6620\u5176\u7528\u9014\u3002<\/li>\n<\/ul>\n<p>\u5206\u652f\u5217\u8868\uff1a<\/p>\n<div id=\"code-try-0\" class=\"codeHeader\" data-bi-name=\"code-header\"><span class=\"language\">Cmd<\/span><button class=\"action position-relative\" type=\"button\" data-bi-name=\"copy\" aria-label=\"\u590d\u5236\u4ee3\u7801\"><\/button><button class=\"action position-relative\" type=\"button\" data-bi-name=\"copy\" aria-label=\"\u590d\u5236\u4ee3\u7801\">\u590d\u5236<\/button><\/p>\n<div class=\"successful-copy-alert position-absolute right-0 top-0 left-0 bottom-0 display-flex align-items-center justify-content-center has-text-success-invert has-background-success is-transparent\" aria-hidden=\"true\"><\/div>\n<\/div>\n<pre class=\"has-inner-focus\" tabindex=\"0\"><code class=\"lang-Cmd\" data-author-content=\"features\/feature-area\/feature-name\r\nusers\/username\/description\r\nusers\/username\/workitem\r\nbugfix\/description\r\nfeatures\/feature-name\r\nfeatures\/feature-area\/feature-name\r\nhotfix\/description\r\n\r\n\">features\/feature-area\/feature-name\r\nusers\/username\/description\r\nusers\/username\/workitem\r\nbugfix\/description\r\nfeatures\/feature-name\r\nfeatures\/feature-area\/feature-name\r\nhotfix\/description\r\n\r\n<\/code><\/pre>\n<\/li>\n<li>\u62c9\u53d6\u8bf7\u6c42\uff1a\n<ul>\n<li>\u8bc4\u5ba1\u5e76\u5408\u5e76\u5e26\u62c9\u53d6\u8bf7\u6c42\u7684\u4ee3\u7801\u3002<\/li>\n<li>\u81ea\u52a8\u6267\u884c\u4f60\u5728\u62c9\u53d6\u8bf7\u6c42\u4e2d\u68c0\u67e5\u548c\u9a8c\u8bc1\u7684\u5185\u5bb9\u3002<\/li>\n<li>\u8ddf\u8e2a\u62c9\u53d6\u8bf7\u6c42\u5b8c\u6210\u6301\u7eed\u65f6\u95f4\uff0c\u5e76\u8bbe\u7f6e\u76ee\u6807\u4ee5\u51cf\u5c11\u6240\u82b1\u8d39\u7684\u65f6\u95f4\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u6211\u4eec\u5c06\u901a\u8fc7\u4f7f\u7528\u672c\u65b9\u6cd5\u4e2d\u7684\u5206\u652f\u7b56\u7565\u65b9\u6cd5\uff0c\u4f7f\u7528\u5728\u62c9\u53d6\u8bf7\u6c42\u4e2d\u521b\u5efa\u7684 myWebApp \u8fdb\u884c\u4ee3\u7801\u8bc4\u5ba1\u3002 \u5982\u679c\u5c1a\u672a\u64cd\u4f5c\uff0c\u8bf7\u6309\u7167\u8be5\u65b9\u6cd5\u4f7f\u7528\u5206\u652f\u7b56\u7565\u9501\u5b9a\u4e3b\u5206\u652f\u3002 \u5728\u6b64\u65b9\u6cd5\u4e2d\uff0c\u6211\u4eec\u8fd8\u5c06\u4f7f\u7528\u5e02\u573a\u4e2d\u7684\u4e09\u4e2a\u6d41\u884c\u6269\u5c55\uff1a<\/p>\n<ul>\n<li><a href=\"https:\/\/docs.microsoft.com\/zh-CN\/cli\/azure\/install-azure-cli\" data-linktype=\"absolute-path\">Azure CLI<\/a>\u662f Azure \u7684\u547d\u4ee4\u884c\u63a5\u53e3\u3002<\/li>\n<li>Azure DevOps CLI\uff1a\u8fd9\u662f\u7528\u4e8e\u5904\u7406 Azure DevOps \u548c Azure DevOps Server \u7684 Azure CLI \u7684\u6269\u5c55\u3002 \u5b83\u65e8\u5728\u4e0e Git\u3001CI \u7ba1\u9053\u548c\u654f\u6377\u5de5\u5177\u65e0\u7f1d\u96c6\u6210\u3002 \u4f7f\u7528 Azure DevOps CLI\uff0c\u65e0\u9700\u79bb\u5f00\u547d\u4ee4\u884c\u5373\u53ef\u53c2\u4e0e\u9879\u76ee\u3002 CLI \u5728 Windows\u3001Linux \u548c Mac \u4e0a\u8fd0\u884c\u3002<\/li>\n<li>Git \u62c9\u53d6\u8bf7\u6c42\u5408\u5e76\u51b2\u7a81\uff1a\u901a\u8fc7 Microsoft DevLabs \u521b\u5efa\u7684\u5f00\u6e90\u6269\u5c55\uff0c\u4f60\u53ef\u4ee5\u5728 Web \u4e0a\u8bc4\u5ba1\u548c\u89e3\u51b3\u62c9\u53d6\u8bf7\u6c42\u5408\u5e76\u51b2\u7a81\u3002 \u5728 Git \u62c9\u53d6\u8bf7\u6c42\u5b8c\u6210\u4e4b\u524d\uff0c\u5fc5\u987b\u89e3\u51b3\u4e0e\u76ee\u6807\u5206\u652f\u7684\u4efb\u4f55\u51b2\u7a81\u3002 \u4f5c\u4e3a\u62c9\u53d6\u8bf7\u6c42\u5408\u5e76\u8fc7\u7a0b\u7684\u4e00\u90e8\u5206\uff0c\u53ef\u4f7f\u7528\u6b64\u6269\u5c55\u5728 Web \u4e0a\u89e3\u51b3\u8fd9\u4e9b\u51b2\u7a81\uff0c\u800c\u4e0d\u662f\u5728\u672c\u5730\u514b\u9686\u4e2d\u6267\u884c\u5408\u5e76\u548c\u89e3\u51b3\u51b2\u7a81\u3002<\/li>\n<\/ul>\n<p>Azure DevOps CLI \u652f\u6301\u4ee5 JSON\u3001JSONC\u3001table \u548c TSV \u8fd4\u56de\u67e5\u8be2\u7ed3\u679c\u3002 \u53ef\u4f7f\u7528\u201c\u914d\u7f6e\u201d\u547d\u4ee4\u6765\u914d\u7f6e\u9996\u9009\u9879\u3002<\/p>\n<h2 id=\"how-to-do-it\">\u5982\u4f55\u5b9e\u73b0<\/h2>\n<ol>\n<li>\u5c06\u4e3b\u5206\u652f\u514b\u9686\u5230\u672c\u5730\u5b58\u50a8\u5e93\u540e\uff0c\u8bf7\u521b\u5efa\u65b0\u7684\u529f\u80fd\u5206\u652f myFeature-1\uff1a\n<div id=\"code-try-1\" class=\"codeHeader\" data-bi-name=\"code-header\"><span class=\"language\">Cmd<\/span><button class=\"action position-relative\" type=\"button\" data-bi-name=\"copy\" aria-label=\"\u590d\u5236\u4ee3\u7801\"><\/button><button class=\"action position-relative\" type=\"button\" data-bi-name=\"copy\" aria-label=\"\u590d\u5236\u4ee3\u7801\">\u590d\u5236<\/button><\/p>\n<div class=\"successful-copy-alert position-absolute right-0 top-0 left-0 bottom-0 display-flex align-items-center justify-content-center has-text-success-invert has-background-success is-transparent\" aria-hidden=\"true\"><\/div>\n<\/div>\n<pre class=\"has-inner-focus\" tabindex=\"0\"><code class=\"lang-Cmd\" style=\"box-sizing: inherit; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 1em; direction: ltr; outline-color: inherit; line-height: 1.3571; border: 0px; display: block; padding: 0px; position: relative;\" data-author-content=\"myWebApp&gt; git checkout -b feature\/myFeature-1\r\nSwitched to a new branch 'feature\/myFeature-1'\r\n\r\n\">myWebApp&gt; git checkout -b feature\/myFeature-<span class=\"hljs-number\">1<\/span>\r\nSwitched to a new branch 'feature\/myFeature-<span class=\"hljs-number\">1<\/span>'\r\n\r\n<\/code><\/pre>\n<\/li>\n<li>\u8fd0\u884c\u201cGit \u5206\u652f\u201d\u547d\u4ee4\u4ee5\u67e5\u770b\u6240\u6709\u5206\u652f\uff0c\u5176\u4e2d\u663e\u793a\u661f\u53f7\u7684\u5206\u652f\u662f\u201c\u5f53\u524d\u5df2\u7b7e\u51fa\u7684\u201d\u5206\u652f\uff1a\n<div id=\"code-try-2\" class=\"codeHeader\" data-bi-name=\"code-header\"><span class=\"language\">Cmd<\/span><button class=\"action position-relative\" type=\"button\" data-bi-name=\"copy\" aria-label=\"\u590d\u5236\u4ee3\u7801\"><\/button><button class=\"action position-relative\" type=\"button\" data-bi-name=\"copy\" aria-label=\"\u590d\u5236\u4ee3\u7801\">\u590d\u5236<\/button><\/p>\n<div class=\"successful-copy-alert position-absolute right-0 top-0 left-0 bottom-0 display-flex align-items-center justify-content-center has-text-success-invert has-background-success is-transparent\" aria-hidden=\"true\"><\/div>\n<\/div>\n<pre class=\"has-inner-focus\" tabindex=\"0\"><code class=\"lang-Cmd\" style=\"box-sizing: inherit; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 1em; direction: ltr; outline-color: inherit; line-height: 1.3571; border: 0px; display: block; padding: 0px; position: relative;\" data-author-content=\"myWebApp&gt; git branch * feature\/myFeature-1  main\r\n\r\n\">myWebApp&gt; git branch * feature\/myFeature-<span class=\"hljs-number\">1<\/span>  main\r\n\r\n<\/code><\/pre>\n<\/li>\n<li>\u5728 feature\/myFeature-1 branch \u4e2d\u5bf9 Program.cs \u6587\u4ef6\u8fdb\u884c\u66f4\u6539\uff1a\n<div id=\"code-try-3\" class=\"codeHeader\" data-bi-name=\"code-header\"><span class=\"language\">Cmd<\/span><button class=\"action position-relative\" type=\"button\" data-bi-name=\"copy\" aria-label=\"\u590d\u5236\u4ee3\u7801\"><\/button><button class=\"action position-relative\" type=\"button\" data-bi-name=\"copy\" aria-label=\"\u590d\u5236\u4ee3\u7801\">\u590d\u5236<\/button><\/p>\n<div class=\"successful-copy-alert position-absolute right-0 top-0 left-0 bottom-0 display-flex align-items-center justify-content-center has-text-success-invert has-background-success is-transparent\" aria-hidden=\"true\"><\/div>\n<\/div>\n<pre class=\"has-inner-focus\" tabindex=\"0\"><code class=\"lang-Cmd\" style=\"box-sizing: inherit; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 1em; direction: ltr; outline-color: inherit; line-height: 1.3571; border: 0px; display: block; padding: 0px; position: relative;\" data-author-content=\"myWebApp&gt; notepad Program.cs\r\n\r\n\">myWebApp&gt; notepad Program.cs\r\n\r\n<\/code><\/pre>\n<\/li>\n<li>\u6682\u5b58\u66f4\u6539\u5e76\u5728\u672c\u5730\u63d0\u4ea4\uff0c\u7136\u540e\u5c06\u5206\u652f\u53d1\u5e03\u5230\u8fdc\u7a0b\uff1a\n<div id=\"code-try-4\" class=\"codeHeader\" data-bi-name=\"code-header\"><span class=\"language\">Cmd<\/span><button class=\"action position-relative\" type=\"button\" data-bi-name=\"copy\" aria-label=\"\u590d\u5236\u4ee3\u7801\"><\/button><button class=\"action position-relative\" type=\"button\" data-bi-name=\"copy\" aria-label=\"\u590d\u5236\u4ee3\u7801\">\u590d\u5236<\/button><\/p>\n<div class=\"successful-copy-alert position-absolute right-0 top-0 left-0 bottom-0 display-flex align-items-center justify-content-center has-text-success-invert has-background-success is-transparent\" aria-hidden=\"true\"><\/div>\n<\/div>\n<pre class=\"has-inner-focus\" tabindex=\"0\"><code class=\"lang-Cmd\" style=\"box-sizing: inherit; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 1em; direction: ltr; outline-color: inherit; line-height: 1.3571; border: 0px; display: block; padding: 0px; position: relative;\" data-author-content=\"myWebApp&gt; git status\r\n\r\nOn branch feature\/myFeature-1 Changes not staged for commit: (use &quot;git add &lt;file&gt;...&quot; to update what will be committed) (use &quot;git checkout -- &lt;file&gt;...&quot; to discard changes in working directory) modified: Program.cs\r\n\r\n\">myWebApp&gt; git status\r\n\r\nOn branch feature\/myFeature-<span class=\"hljs-number\">1<\/span> Changes <span class=\"hljs-keyword\">not<\/span> staged <span class=\"hljs-keyword\">for<\/span> commit: (use \"git add &lt;file&gt;...\" to update what will be committed) (use \"git checkout -- &lt;file&gt;...\" to discard changes <span class=\"hljs-keyword\">in<\/span> working directory) modified: Program.cs\r\n\r\n<\/code><\/pre>\n<div id=\"code-try-5\" class=\"codeHeader\" data-bi-name=\"code-header\"><span class=\"language\">Cmd<\/span><button class=\"action position-relative\" type=\"button\" data-bi-name=\"copy\" aria-label=\"\u590d\u5236\u4ee3\u7801\"><\/button><button class=\"action position-relative\" type=\"button\" data-bi-name=\"copy\" aria-label=\"\u590d\u5236\u4ee3\u7801\">\u590d\u5236<\/button><\/p>\n<div class=\"successful-copy-alert position-absolute right-0 top-0 left-0 bottom-0 display-flex align-items-center justify-content-center has-text-success-invert has-background-success is-transparent\" aria-hidden=\"true\"><\/div>\n<\/div>\n<pre class=\"has-inner-focus\" tabindex=\"0\"><code class=\"lang-Cmd\" style=\"box-sizing: inherit; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 1em; direction: ltr; outline-color: inherit; line-height: 1.3571; border: 0px; display: block; padding: 0px; position: relative;\" data-author-content=\"myWebApp&gt; git add .\r\nmyWebApp&gt; git commit -m &quot;Feature 1 added to Program.cs&quot;\r\n\r\n[feature\/myFeature-1 70f67b2] feature 1 added to program.cs 1 file changed, 1 insertion(+)\r\n\r\n\">myWebApp&gt; git add .\r\nmyWebApp&gt; git commit -m \"Feature <span class=\"hljs-number\">1<\/span> added to Program.cs\"\r\n\r\n[feature\/myFeature-<span class=\"hljs-number\">1<\/span> <span class=\"hljs-number\">70<\/span>f67b2] feature <span class=\"hljs-number\">1<\/span> added to program.cs <span class=\"hljs-number\">1<\/span> file changed, <span class=\"hljs-number\">1<\/span> insertion(+)\r\n\r\n<\/code><\/pre>\n<div id=\"code-try-6\" class=\"codeHeader\" data-bi-name=\"code-header\"><span class=\"language\">Cmd<\/span><button class=\"action position-relative\" type=\"button\" data-bi-name=\"copy\" aria-label=\"\u590d\u5236\u4ee3\u7801\"><\/button><button class=\"action position-relative\" type=\"button\" data-bi-name=\"copy\" aria-label=\"\u590d\u5236\u4ee3\u7801\">\u590d\u5236<\/button><\/p>\n<div class=\"successful-copy-alert position-absolute right-0 top-0 left-0 bottom-0 display-flex align-items-center justify-content-center has-text-success-invert has-background-success is-transparent\" aria-hidden=\"true\"><\/div>\n<\/div>\n<pre class=\"has-inner-focus\" tabindex=\"0\"><code class=\"lang-Cmd\" style=\"box-sizing: inherit; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 1em; direction: ltr; outline-color: inherit; line-height: 1.3571; border: 0px; display: block; padding: 0px; position: relative;\" data-author-content=\"myWebApp&gt; git push -u origin feature\/myFeature-1\r\n\r\nDelta compression using up to 8 threads. Compressing objects: 100% (3\/3), done. Writing objects: 100% (3\/3), 348 bytes | 348.00 KiB\/s, done. Total 3 (delta 2), reused 0 (delta 0) remote: Analyzing objects... (3\/3) (10 ms) remote: Storing packfile... done (44 ms) remote: Storing index... done (62 ms) To http:\/\/dev.azure.com\/Geeks\/PartsUnlimited\/_git\/MyWebApp * [new branch] feature\/myFeature-1 -&gt; feature\/myFeature-1 Branch feature\/myFeature-1 set up to track remote branch feature\/myFeature-1 from origin.\r\n\r\n\">myWebApp&gt; git push -u origin feature\/myFeature-<span class=\"hljs-number\">1<\/span>\r\n\r\nDelta compression using up to <span class=\"hljs-number\">8<\/span> threads. Compressing objects: <span class=\"hljs-number\">100<\/span>% (<span class=\"hljs-number\">3<\/span>\/<span class=\"hljs-number\">3<\/span>), done. Writing objects: <span class=\"hljs-number\">100<\/span>% (<span class=\"hljs-number\">3<\/span>\/<span class=\"hljs-number\">3<\/span>), <span class=\"hljs-number\">348<\/span> bytes | <span class=\"hljs-number\">348<\/span>.<span class=\"hljs-number\">00<\/span> KiB\/s, done. Total <span class=\"hljs-number\">3<\/span> (delta <span class=\"hljs-number\">2<\/span>), reused <span class=\"hljs-number\">0<\/span> (delta <span class=\"hljs-number\">0<\/span>) remote: Analyzing objects... (<span class=\"hljs-number\">3<\/span>\/<span class=\"hljs-number\">3<\/span>) (<span class=\"hljs-number\">10<\/span> ms) remote: Storing packfile... done (<span class=\"hljs-number\">44<\/span> ms) remote: Storing index... done (<span class=\"hljs-number\">62<\/span> ms) To http:\/\/dev.azure.com\/Geeks\/PartsUnlimited\/_git\/MyWebApp * [new branch] feature\/myFeature-<span class=\"hljs-number\">1<\/span> -&gt; feature\/myFeature-<span class=\"hljs-number\">1<\/span> Branch feature\/myFeature-<span class=\"hljs-number\">1<\/span> <span class=\"hljs-built_in\">set<\/span> up to track remote branch feature\/myFeature-<span class=\"hljs-number\">1<\/span> from origin.\r\n\r\n<\/code><\/pre>\n<p>\u8fdc\u7a0b\u663e\u793a\u66f4\u6539\u7684\u5386\u53f2\u8bb0\u5f55\uff1a<\/p>\n<p><span class=\"mx-imgBorder\"><img decoding=\"async\" src=\"https:\/\/docs.microsoft.com\/zh-cn\/learn\/wwl-azure\/manage-git-branches-workflows\/media\/remote-history-changes-133245b4.png\" alt=\"Screenshot showing the remote history of the changes.\" data-linktype=\"relative-path\" \/><\/span><\/li>\n<li>\u521b\u5efa\u65b0\u7684\u62c9\u53d6\u8bf7\u6c42\uff08\u4f7f\u7528 Azure DevOps CLI\uff09\uff0c\u4ee5\u8bc4\u5ba1 feature-1 \u5206\u652f\u4e2d\u7684\u66f4\u6539\uff1a\n<div id=\"code-try-7\" class=\"codeHeader\" data-bi-name=\"code-header\"><span class=\"language\">Cmd<\/span><button class=\"action position-relative\" type=\"button\" data-bi-name=\"copy\" aria-label=\"\u590d\u5236\u4ee3\u7801\"><\/button><button class=\"action position-relative\" type=\"button\" data-bi-name=\"copy\" aria-label=\"\u590d\u5236\u4ee3\u7801\">\u590d\u5236<\/button><\/p>\n<div class=\"successful-copy-alert position-absolute right-0 top-0 left-0 bottom-0 display-flex align-items-center justify-content-center has-text-success-invert has-background-success is-transparent\" aria-hidden=\"true\"><\/div>\n<\/div>\n<pre class=\"has-inner-focus\" tabindex=\"0\"><code class=\"lang-Cmd\" data-author-content=\"  az repos pr create --title &quot;Review Feature-1 before merging to main&quot; --work-items 38 39 &#96;\r\n          -d &quot;#Merge feature-1 to main&quot; &#96;\r\n          -s feature\/myFeature-1 -t main -r myWebApp -p\r\n  $prj -i $i\r\n\r\n\">  az repos pr create --<span class=\"hljs-built_in\">title<\/span> \"Review Feature-<span class=\"hljs-number\">1<\/span> before merging to main\" --work-items <span class=\"hljs-number\">38<\/span> <span class=\"hljs-number\">39<\/span> `\r\n          -d \"#Merge feature-<span class=\"hljs-number\">1<\/span> to main\" `\r\n          -s feature\/myFeature-<span class=\"hljs-number\">1<\/span> -t main -r myWebApp -p\r\n  $prj -i $i\r\n\r\n<\/code><\/pre>\n<p>\u5728\u521b\u5efa\u62c9\u53d6\u8bf7\u6c42\u540e\uff0c\u8bf7\u5728\u63d0\u51fa\u62c9\u53d6\u8bf7\u6c42\u65f6\uff0c\u4f7f\u7528 &#8211;open \u5f00\u5173\u5728 Web \u6d4f\u89c8\u5668\u4e2d\u6253\u5f00\u62c9\u53d6\u8bf7\u6c42\u3002 \u5728\u62c9\u53d6\u8bf7\u6c42\u5b8c\u6210\u540e\uff0c\u53ef\u4f7f\u7528 &#8211;deletesource-branch \u5f00\u5173\u5220\u9664\u5206\u652f\u3002 \u6b64\u5916\uff0c\u8bf7\u8003\u8651\u4f7f\u7528 &#8211;auto-complete\uff0c\u4f7f\u6240\u6709\u7b56\u7565\u901a\u8fc7\u65f6\u81ea\u52a8\u5b8c\u6210\uff0c\u5e76\u4e14\u53ef\u5c06\u6e90\u5206\u652f\u5408\u5e76\u5230\u76ee\u6807\u5206\u652f\u4e2d\u3002<\/p>\n<p>\u56e2\u961f\u8054\u5408\u8bc4\u5ba1\u4ee3\u7801\u66f4\u6539\u5e76\u6279\u51c6\u62c9\u53d6\u8bf7\u6c42\uff1a<\/p>\n<p><span class=\"mx-imgBorder\"><img decoding=\"async\" src=\"https:\/\/docs.microsoft.com\/zh-cn\/learn\/wwl-azure\/manage-git-branches-workflows\/media\/pr-code-changes-approved-completed-90fe3da6.png\" alt=\"Screenshot showing the pull request with code changes approved and completed.\" data-linktype=\"relative-path\" \/><\/span><\/p>\n<p>\u4e3b\u5206\u652f\u53ef\u968f\u65f6\u8fdb\u884c\u53d1\u5e03\u3002 \u56e2\u961f\u7528\u53d1\u5e03\u53f7\u6807\u8bb0\u4e3b\u5206\u652f\uff1a<\/p>\n<p><span class=\"mx-imgBorder\"><img decoding=\"async\" src=\"https:\/\/docs.microsoft.com\/zh-cn\/learn\/wwl-azure\/manage-git-branches-workflows\/media\/create-tag-example-9a81a5d0.png\" alt=\"Create a tag example.\" data-linktype=\"relative-path\" \/><\/span><\/li>\n<li>\u5f00\u59cb\u4f7f\u7528\u529f\u80fd 2\u3002 \u4ece\u4e3b\u5206\u652f\u521b\u5efa\u8fdc\u7a0b\u5206\u652f\uff0c\u5e76\u5728\u672c\u5730\u6267\u884c\u7b7e\u51fa\uff1a\n<div id=\"code-try-8\" class=\"codeHeader\" data-bi-name=\"code-header\"><span class=\"language\">Cmd<\/span><button class=\"action position-relative\" type=\"button\" data-bi-name=\"copy\" aria-label=\"\u590d\u5236\u4ee3\u7801\"><\/button><button class=\"action position-relative\" type=\"button\" data-bi-name=\"copy\" aria-label=\"\u590d\u5236\u4ee3\u7801\">\u590d\u5236<\/button><\/p>\n<div class=\"successful-copy-alert position-absolute right-0 top-0 left-0 bottom-0 display-flex align-items-center justify-content-center has-text-success-invert has-background-success is-transparent\" aria-hidden=\"true\"><\/div>\n<\/div>\n<pre class=\"has-inner-focus\" tabindex=\"0\"><code class=\"lang-Cmd\" style=\"box-sizing: inherit; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 1em; direction: ltr; outline-color: inherit; line-height: 1.3571; border: 0px; display: block; padding: 0px; position: relative;\" data-author-content=\"myWebApp&gt; git push origin origin:refs\/heads\/feature\/myFeature-2\r\n\r\nTotal 0 (delta 0), reused 0 (delta 0) To https:\/\/dev.azure.com\/Geeks\/PartsUnlimited\/_git\/MyWebApp * [new branch] origin\/HEAD -&gt; refs\/heads\/feature\/myFeature-2\r\n\r\n\">myWebApp&gt; git push origin origin:refs\/heads\/feature\/myFeature-<span class=\"hljs-number\">2<\/span>\r\n\r\nTotal <span class=\"hljs-number\">0<\/span> (delta <span class=\"hljs-number\">0<\/span>), reused <span class=\"hljs-number\">0<\/span> (delta <span class=\"hljs-number\">0<\/span>) To https:\/\/dev.azure.com\/Geeks\/PartsUnlimited\/_git\/MyWebApp * [new branch] origin\/HEAD -&gt; refs\/heads\/feature\/myFeature-<span class=\"hljs-number\">2<\/span>\r\n\r\n<\/code><\/pre>\n<div id=\"code-try-9\" class=\"codeHeader\" data-bi-name=\"code-header\"><span class=\"language\">Cmd<\/span><button class=\"action position-relative\" type=\"button\" data-bi-name=\"copy\" aria-label=\"\u590d\u5236\u4ee3\u7801\"><\/button><button class=\"action position-relative\" type=\"button\" data-bi-name=\"copy\" aria-label=\"\u590d\u5236\u4ee3\u7801\">\u590d\u5236<\/button><\/p>\n<div class=\"successful-copy-alert position-absolute right-0 top-0 left-0 bottom-0 display-flex align-items-center justify-content-center has-text-success-invert has-background-success is-transparent\" aria-hidden=\"true\"><\/div>\n<\/div>\n<pre class=\"has-inner-focus\" tabindex=\"0\"><code class=\"lang-Cmd\" style=\"box-sizing: inherit; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 1em; direction: ltr; outline-color: inherit; line-height: 1.3571; border: 0px; display: block; padding: 0px; position: relative;\" data-author-content=\"myWebApp&gt; git checkout feature\/myFeature-2\r\n\r\nSwitched to a new branch 'feature\/myFeature-2' Branch feature\/myFeature-2 set up to track remote branch feature\/myFeature-2 from origin.\r\n\r\n\">myWebApp&gt; git checkout feature\/myFeature-<span class=\"hljs-number\">2<\/span>\r\n\r\nSwitched to a new branch 'feature\/myFeature-<span class=\"hljs-number\">2<\/span>' Branch feature\/myFeature-<span class=\"hljs-number\">2<\/span> <span class=\"hljs-built_in\">set<\/span> up to track remote branch feature\/myFeature-<span class=\"hljs-number\">2<\/span> from origin.\r\n\r\n<\/code><\/pre>\n<\/li>\n<li>\u901a\u8fc7\u66f4\u6539\u5728 feature-1 \u4e2d\u66f4\u6539\u7684\u4ee3\u7801\u4e2d\u7684\u540c\u4e00\u6ce8\u91ca\u884c\u6765\u4fee\u6539 Program.cs\u3002\n<div id=\"code-try-10\" class=\"codeHeader\" data-bi-name=\"code-header\"><button class=\"action position-relative\" type=\"button\" data-bi-name=\"copy\" aria-label=\"\u590d\u5236\u4ee3\u7801\"><\/button><button class=\"action position-relative\" type=\"button\" data-bi-name=\"copy\" aria-label=\"\u590d\u5236\u4ee3\u7801\">\u590d\u5236<\/button><\/p>\n<div class=\"successful-copy-alert position-absolute right-0 top-0 left-0 bottom-0 display-flex align-items-center justify-content-center has-text-success-invert has-background-success is-transparent\" aria-hidden=\"true\"><\/div>\n<\/div>\n<pre class=\"has-inner-focus\" tabindex=\"0\"><code style=\"box-sizing: inherit; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 1em; direction: ltr; outline-color: inherit; line-height: 1.3571; border: 0px; display: block; padding: 0px; position: relative;\" data-author-content=\"public class Program\r\n{\r\n    \/\/ Editing the same line (file from feature-2 branch)\r\n    public static void Main(string[] args)\r\n    {\r\n        BuildWebHost(args).Run();\r\n    }\r\n\r\n    public static IWebHost BuildWebHost(string[] args) =&gt;\r\n        WebHost.CreateDefaultBuilder(args)\r\n            .UseStartup&lt;Startup&gt;()\r\n            .Build();\r\n\r\n\r\n\">public class Program\r\n{\r\n    \/\/ Editing the same line (file from feature-2 branch)\r\n    public static void Main(string[] args)\r\n    {\r\n        BuildWebHost(args).Run();\r\n    }\r\n\r\n    public static IWebHost BuildWebHost(string[] args) =&gt;\r\n        WebHost.CreateDefaultBuilder(args)\r\n            .UseStartup&lt;Startup&gt;()\r\n            .Build();\r\n\r\n\r\n<\/code><\/pre>\n<\/li>\n<li>\u5728\u672c\u5730\u63d0\u4ea4\u66f4\u6539\uff0c\u63a8\u9001\u5230\u8fdc\u7a0b\u5b58\u50a8\u5e93\uff0c\u7136\u540e\u63d0\u51fa\u62c9\u53d6\u8bf7\u6c42\uff0c\u5c06\u66f4\u6539\u4ece feature\/myFeature-2 \u5408\u5e76\u5230\u4e3b\u5206\u652f\uff1a\n<div id=\"code-try-11\" class=\"codeHeader\" data-bi-name=\"code-header\"><span class=\"language\">Cmd<\/span><button class=\"action position-relative\" type=\"button\" data-bi-name=\"copy\" aria-label=\"\u590d\u5236\u4ee3\u7801\"><\/button><button class=\"action position-relative\" type=\"button\" data-bi-name=\"copy\" aria-label=\"\u590d\u5236\u4ee3\u7801\">\u590d\u5236<\/button><\/p>\n<div class=\"successful-copy-alert position-absolute right-0 top-0 left-0 bottom-0 display-flex align-items-center justify-content-center has-text-success-invert has-background-success is-transparent\" aria-hidden=\"true\"><\/div>\n<\/div>\n<pre class=\"has-inner-focus\" tabindex=\"0\"><code class=\"lang-Cmd\" data-author-content=\"  az repos pr create --title &quot;Review Feature-2 before merging to main&quot; --work-items 40 42 &#96;\r\n            -d &quot;#Merge feature-2 to main&quot; &#96;\r\n            -s feature\/myFeature-2 -t main -r myWebApp -p\r\n  $prj -i $1\r\n\r\n\">  az repos pr create --<span class=\"hljs-built_in\">title<\/span> \"Review Feature-<span class=\"hljs-number\">2<\/span> before merging to main\" --work-items <span class=\"hljs-number\">40<\/span> <span class=\"hljs-number\">42<\/span> `\r\n            -d \"#Merge feature-<span class=\"hljs-number\">2<\/span> to main\" `\r\n            -s feature\/myFeature-<span class=\"hljs-number\">2<\/span> -t main -r myWebApp -p\r\n  $prj -i $<span class=\"hljs-number\">1<\/span>\r\n\r\n<\/code><\/pre>\n<p>\u4f7f\u7528\u62c9\u53d6\u8bf7\u6c42\u65f6\uff0c\u5c06\u6839\u636e feature-1 \u7684\u53d1\u5e03\u62a5\u544a\u751f\u4ea7\u4e2d\u7684\u91cd\u8981 bug\u3002 \u82e5\u8981\u8c03\u67e5\u6b64\u95ee\u9898\uff0c\u9700\u8981\u6839\u636e\u5f53\u524d\u5728\u751f\u4ea7\u4e2d\u90e8\u7f72\u7684\u4ee3\u7801\u7248\u672c\u8fdb\u884c\u8c03\u8bd5\u3002 \u82e5\u8981\u8c03\u67e5\u6b64\u95ee\u9898\uff0c\u8bf7\u4f7f\u7528\u201crelease_feature1\u201d\u6807\u8bb0\u521b\u5efa\u65b0\u7684 fof \u5206\u652f\uff1a<\/p>\n<div id=\"code-try-12\" class=\"codeHeader\" data-bi-name=\"code-header\"><span class=\"language\">Cmd<\/span><button class=\"action position-relative\" type=\"button\" data-bi-name=\"copy\" aria-label=\"\u590d\u5236\u4ee3\u7801\"><\/button><button class=\"action position-relative\" type=\"button\" data-bi-name=\"copy\" aria-label=\"\u590d\u5236\u4ee3\u7801\">\u590d\u5236<\/button><\/p>\n<div class=\"successful-copy-alert position-absolute right-0 top-0 left-0 bottom-0 display-flex align-items-center justify-content-center has-text-success-invert has-background-success is-transparent\" aria-hidden=\"true\"><\/div>\n<\/div>\n<pre class=\"has-inner-focus\" tabindex=\"0\"><code class=\"lang-Cmd\" style=\"box-sizing: inherit; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 1em; direction: ltr; outline-color: inherit; line-height: 1.3571; border: 0px; display: block; padding: 0px; position: relative;\" data-author-content=\"myWebApp&gt; git checkout -b fof\/bug-1 release_feature1\r\nSwitched to a new branch 'fof\/bug-1'\r\n\r\n\">myWebApp&gt; git checkout -b fof\/bug-<span class=\"hljs-number\">1<\/span> release_feature1\r\nSwitched to a new branch 'fof\/bug-<span class=\"hljs-number\">1<\/span>'\r\n\r\n<\/code><\/pre>\n<\/li>\n<li>\u901a\u8fc7\u66f4\u6539\u5728 feature-1 \u53d1\u5e03\u4e2d\u66f4\u6539\u7684\u4ee3\u7801\u4e2d\u7684\u540c\u4e00\u4ee3\u7801\u884c\u6765\u4fee\u6539 Program.cs\uff1a\n<div id=\"code-try-13\" class=\"codeHeader\" data-bi-name=\"code-header\"><button class=\"action position-relative\" type=\"button\" data-bi-name=\"copy\" aria-label=\"\u590d\u5236\u4ee3\u7801\"><\/button><button class=\"action position-relative\" type=\"button\" data-bi-name=\"copy\" aria-label=\"\u590d\u5236\u4ee3\u7801\">\u590d\u5236<\/button><\/p>\n<div class=\"successful-copy-alert position-absolute right-0 top-0 left-0 bottom-0 display-flex align-items-center justify-content-center has-text-success-invert has-background-success is-transparent\" aria-hidden=\"true\"><\/div>\n<\/div>\n<pre class=\"has-inner-focus\" tabindex=\"0\"><code style=\"box-sizing: inherit; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 1em; direction: ltr; outline-color: inherit; line-height: 1.3571; border: 0px; display: block; padding: 0px; position: relative;\" data-author-content=\"public class Program\r\n{\r\n    \/\/ Editing the same line (file from feature-FOF branch)\r\n    public static void Main(string[] args)\r\n    {\r\n        BuildWebHost(args).Run();\r\n    }\r\n\r\n    public static IWebHost BuildWebHost(string[] args) =&gt;\r\n        WebHost.CreateDefaultBuilder(args)\r\n            .UseStartup&lt;Startup&gt;()\r\n            .Build();\r\n\r\n\r\n\">public class Program\r\n{\r\n    \/\/ Editing the same line (file from feature-FOF branch)\r\n    public static void Main(string[] args)\r\n    {\r\n        BuildWebHost(args).Run();\r\n    }\r\n\r\n    public static IWebHost BuildWebHost(string[] args) =&gt;\r\n        WebHost.CreateDefaultBuilder(args)\r\n            .UseStartup&lt;Startup&gt;()\r\n            .Build();\r\n\r\n\r\n<\/code><\/pre>\n<\/li>\n<li>\u5728\u672c\u5730\u6682\u5b58\u548c\u63d0\u4ea4\u66f4\u6539\uff0c\u7136\u540e\u5c06\u66f4\u6539\u63a8\u9001\u5230\u8fdc\u7a0b\u5b58\u50a8\u5e93\uff1a\n<div id=\"code-try-14\" class=\"codeHeader\" data-bi-name=\"code-header\"><span class=\"language\">Cmd<\/span><button class=\"action position-relative\" type=\"button\" data-bi-name=\"copy\" aria-label=\"\u590d\u5236\u4ee3\u7801\"><\/button><button class=\"action position-relative\" type=\"button\" data-bi-name=\"copy\" aria-label=\"\u590d\u5236\u4ee3\u7801\">\u590d\u5236<\/button><\/p>\n<div class=\"successful-copy-alert position-absolute right-0 top-0 left-0 bottom-0 display-flex align-items-center justify-content-center has-text-success-invert has-background-success is-transparent\" aria-hidden=\"true\"><\/div>\n<\/div>\n<pre class=\"has-inner-focus\" tabindex=\"0\"><code class=\"lang-Cmd\" style=\"box-sizing: inherit; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 1em; direction: ltr; outline-color: inherit; line-height: 1.3571; border: 0px; display: block; padding: 0px; position: relative;\" data-author-content=\"myWebApp&gt; git add .\r\n\r\nmyWebApp&gt; git commit -m &quot;Adding FOF changes&quot;\r\n\r\nmyWebApp&gt; git push -u origin fof\/bug-1\r\n\r\nTo https:\/\/dev.azure.com\/Geeks\/PartsUnlimited\/_git\/MyWebApp * [new branch] fof\/bug-1 -&gt; fof\/bug-1 Branch fof\/bug-1 set up to track remote branch fof\/bug-1 from origin.\r\n\r\n\">myWebApp&gt; git add .\r\n\r\nmyWebApp&gt; git commit -m \"Adding FOF changes\"\r\n\r\nmyWebApp&gt; git push -u origin fof\/bug-<span class=\"hljs-number\">1<\/span>\r\n\r\nTo https:\/\/dev.azure.com\/Geeks\/PartsUnlimited\/_git\/MyWebApp * [new branch] fof\/bug-<span class=\"hljs-number\">1<\/span> -&gt; fof\/bug-<span class=\"hljs-number\">1<\/span> Branch fof\/bug-<span class=\"hljs-number\">1<\/span> <span class=\"hljs-built_in\">set<\/span> up to track remote branch fof\/bug-<span class=\"hljs-number\">1<\/span> from origin.\r\n\r\n<\/code><\/pre>\n<\/li>\n<li>\u5728\u5c06\u66f4\u6539\u63a8\u51fa\u5230\u751f\u4ea7\u540e\uff0c\u8bf7\u7acb\u5373\u5c06 fof\\bug-1 \u5206\u652f\u6807\u8bb0\u4e3a release_bug-1 \u6807\u8bb0\uff0c\u7136\u540e\u63d0\u51fa\u62c9\u53d6\u8bf7\u6c42\uff0c\u5c06 fof\/bug-1 \u4e2d\u7684\u66f4\u6539\u5408\u5e76\u56de\u5230\u4e3b\u5206\u652f\uff1a\n<div id=\"code-try-15\" class=\"codeHeader\" data-bi-name=\"code-header\"><span class=\"language\">Cmd<\/span><button class=\"action position-relative\" type=\"button\" data-bi-name=\"copy\" aria-label=\"\u590d\u5236\u4ee3\u7801\"><\/button><button class=\"action position-relative\" type=\"button\" data-bi-name=\"copy\" aria-label=\"\u590d\u5236\u4ee3\u7801\">\u590d\u5236<\/button><\/p>\n<div class=\"successful-copy-alert position-absolute right-0 top-0 left-0 bottom-0 display-flex align-items-center justify-content-center has-text-success-invert has-background-success is-transparent\" aria-hidden=\"true\"><\/div>\n<\/div>\n<pre class=\"has-inner-focus\" tabindex=\"0\"><code class=\"lang-Cmd\" data-author-content=\"  az repos pr create --title &quot;Review Bug-1 before merging to main&quot; --work-items 100 &#96;\r\n            -d &quot;#Merge Bug-1 to main&quot; &#96;\r\n            -s fof\/Bug-1 -t main -r myWebApp -p\r\n  $prj -i $i\r\n\r\n\">  az repos pr create --<span class=\"hljs-built_in\">title<\/span> \"Review Bug-<span class=\"hljs-number\">1<\/span> before merging to main\" --work-items <span class=\"hljs-number\">100<\/span> `\r\n            -d \"#Merge Bug-<span class=\"hljs-number\">1<\/span> to main\" `\r\n            -s fof\/Bug-<span class=\"hljs-number\">1<\/span> -t main -r myWebApp -p\r\n  $prj -i $i\r\n\r\n<\/code><\/pre>\n<p>\u5728\u62c9\u53d6\u8bf7\u6c42\u8fc7\u7a0b\u4e2d\uff0c\u5c06\u5220\u9664\u8be5\u5206\u652f\u3002 \u4f46\u4ecd\u53ef\u4ee5\u4f7f\u7528\u6807\u8bb0\u5c06\u6574\u4e2a\u5386\u53f2\u8bb0\u5f55\u5f15\u7528\u5230\u8be5\u70b9\u3002<\/p>\n<p>\u4fee\u590d\u91cd\u8981 bug \u540e\uff0c\u8fd4\u56de\u5230 feature-2 \u62c9\u53d6\u8bf7\u6c42\u7684\u8bc4\u5ba1\u5904\u3002<\/p>\n<p>\u5206\u652f\u9875\u8868\u660e feature\/myFeature-2 \u5206\u652f\u5728\u4e3b\u5206\u652f\u524d\u505a\u4e00\u4e2a\u66f4\u6539\uff0c\u5728\u4e3b\u5206\u652f\u540e\u505a\u4e24\u4e2a\u66f4\u6539\uff1a<\/p>\n<p><span class=\"mx-imgBorder\"><img decoding=\"async\" src=\"https:\/\/docs.microsoft.com\/zh-cn\/learn\/wwl-azure\/manage-git-branches-workflows\/media\/branches-page-352f877b.png\" alt=\"Screenshot showing the branches page. The feature myFeature 2 branch is one change ahead of the main and two changes behind the main.\" data-linktype=\"relative-path\" \/><\/span><\/p>\n<p>\u5982\u679c\u5c1d\u8bd5\u6279\u51c6\u62c9\u53d6\u8bf7\u6c42\uff0c\u5219\u4f1a\u770b\u5230\u4e00\u6761\u9519\u8bef\u6d88\u606f\uff0c\u544a\u77e5\u4f60\u5408\u5e76\u51b2\u7a81\uff1a<\/p>\n<p><span class=\"mx-imgBorder\"><img decoding=\"async\" src=\"https:\/\/docs.microsoft.com\/zh-cn\/learn\/wwl-azure\/manage-git-branches-workflows\/media\/merge-conflicts-pull-request-84cba5e1.png\" alt=\"Screenshot showing merge conflicts from pull request.\" data-linktype=\"relative-path\" \/><\/span><\/li>\n<li>\u53ef\u4f7f\u7528 Git \u62c9\u53d6\u8bf7\u6c42\u5408\u5e76\u51b2\u7a81\u89e3\u51b3\u6269\u5c55\u89e3\u51b3\u6d4f\u89c8\u5668\u4e2d\u7684\u5408\u5e76\u51b2\u7a81\u3002 \u5bfc\u822a\u5230\u201c\u51b2\u7a81\u201d\u9009\u9879\u5361\uff0c\u7136\u540e\u5355\u51fb\u201cProgram.cs\u201d\u4ee5\u89e3\u51b3\u5408\u5e76\u51b2\u7a81\uff1a\n<p><span class=\"mx-imgBorder\"><img decoding=\"async\" src=\"https:\/\/docs.microsoft.com\/zh-cn\/learn\/wwl-azure\/manage-git-branches-workflows\/media\/git-pr-merge-conflict-resolution-extension-0e6d8b72.png\" alt=\"Screenshot from the Git pull request merge conflict resolution extension.\" data-linktype=\"relative-path\" \/><\/span><\/p>\n<p>\u901a\u8fc7\u7528\u6237\u754c\u9762\uff0c\u53ef\u83b7\u53d6\u6e90\u3001\u76ee\u6807\uff0c\u6216\u6dfb\u52a0\u81ea\u5b9a\u4e49\u66f4\u6539\uff0c\u7136\u540e\u8bc4\u5ba1\u5e76\u63d0\u4ea4\u5408\u5e76\u3002 \u5408\u5e76\u66f4\u6539\u540e\uff0c\u62c9\u53d6\u8bf7\u6c42\u4e5f\u5df2\u5b8c\u6210\u3002<\/li>\n<\/ol>\n<h2 id=\"how-it-works\">\u5de5\u4f5c\u539f\u7406<\/h2>\n<p>\u6211\u4eec\u4e86\u89e3\u4e86 Git \u5206\u652f\u6a21\u578b\u5982\u4f55\u8ba9\u4f60\u7075\u6d3b\u5730\u901a\u8fc7\u521b\u5efa\u6bcf\u4e2a\u529f\u80fd\u7684\u5206\u652f\u6765\u5e76\u884c\u5904\u7406\u529f\u80fd\u3002<\/p>\n<p>\u901a\u8fc7\u62c9\u53d6\u8bf7\u6c42\u5de5\u4f5c\u6d41\uff0c\u4f60\u53ef\u4f7f\u7528\u5206\u652f\u7b56\u7565\u8bc4\u5ba1\u4ee3\u7801\u66f4\u6539\u3002<\/p>\n<p>Git \u6807\u8bb0\u662f\u4e00\u79cd\u8bb0\u5f55\u91cc\u7a0b\u7891\uff08\u4f8b\u5982\u5df2\u53d1\u5e03\u7684\u4ee3\u7801\u7248\u672c\uff09\u7684\u597d\u65b9\u6cd5\uff1b\u6807\u8bb0\u53ef\u63d0\u4f9b\u4ece\u6807\u8bb0\u521b\u5efa\u5206\u652f\u7684\u65b9\u6cd5\u3002<\/p>\n<p>\u6211\u4eec\u6839\u636e\u4ee5\u524d\u7684\u53d1\u5e03\u6807\u8bb0\u521b\u5efa\u4e86\u4e00\u4e2a\u5206\u652f\uff0c\u4ee5\u4fee\u590d\u751f\u4ea7\u4e2d\u7684\u91cd\u8981 bug\u3002<\/p>\n<p>\u901a\u8fc7 Web \u95e8\u6237\u4e2d\u7684\u5206\u652f\u89c6\u56fe\uff0c\u53ef\u8f7b\u677e\u5728\u4e3b\u5206\u652f\u524d\u9762\u6807\u8bc6\u5206\u652f\u3002 \u6b64\u5916\uff0c\u5982\u679c\u4efb\u4f55\u6b63\u5728\u8fdb\u884c\u7684\u62c9\u53d6\u8bf7\u6c42\u5728\u6ca1\u6709\u89e3\u51b3\u5408\u5e76\u51b2\u7a81\u7684\u60c5\u51b5\u4e0b\u5c1d\u8bd5\u5408\u5e76\u5230\u4e3b\u5206\u652f\uff0c\u5219\u5c06\u5f3a\u5236\u53d1\u751f\u5408\u5e76\u51b2\u7a81\u3002<\/p>\n<p>\u901a\u8fc7\u50cf\u8fd9\u6837\u7684\u7cbe\u7b80\u5206\u652f\u6a21\u578b\uff0c\u4f60\u53ef\u521b\u5efa\u77ed\u671f\u5206\u652f\uff0c\u5e76\u66f4\u5feb\u5730\u5c06\u8d28\u91cf\u66f4\u6539\u63a8\u9001\u5230\u751f\u4ea7\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u539f\u6587\u5730\u5740 &nbsp; \u5df2\u5b8c\u6210100 X<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[24],"tags":[121],"class_list":["post-5698","post","type-post","status-publish","format-standard","hentry","category-value_docs","tag-05-"],"_links":{"self":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/5698","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/comments?post=5698"}],"version-history":[{"count":0,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/5698\/revisions"}],"wp:attachment":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/media?parent=5698"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/categories?post=5698"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/tags?post=5698"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}