{"id":380175,"date":"2023-08-15T03:50:52","date_gmt":"2023-08-15T02:50:52","guid":{"rendered":"https:\/\/blog.jetbrains.com\/?post_type=blog&#038;p=380175"},"modified":"2023-08-15T11:05:03","modified_gmt":"2023-08-15T10:05:03","slug":"jetbrains-ide-gitlab","status":"publish","type":"blog","link":"https:\/\/blog.jetbrains.com\/zh-hans\/blog\/2023\/08\/15\/jetbrains-ide-gitlab\/","title":{"rendered":"JetBrains IDE \u4e2d\u7684 GitLab \u652f\u6301"},"content":{"rendered":"<p>GitLab \u662f\u6700\u6d41\u884c\u7684\u57fa\u4e8e git \u7684\u8f6f\u4ef6\u5f00\u53d1\u548c\u90e8\u7f72\u5e73\u53f0\u4e4b\u4e00\u3002 \u867d\u7136\u5f88\u957f\u4e00\u6bb5\u65f6\u95f4\u4ee5\u6765\uff0c\u6240\u6709\u57fa\u672c git \u64cd\u4f5c\u90fd\u5df2\u7ecf\u53ef\u4ee5\u901a\u8fc7 GitLab \u5b9e\u73b0\uff0c\u4f46 GitLab \u96c6\u6210\u4ecd\u662f JetBrains \u793e\u533a\u7684\u4e00\u5927\u6700\u70ed\u95e8\u8bf7\u6c42\u3002 \u4e3a\u6b64\uff0cJetBrains \u56e2\u961f\u4eca\u5e74\u4e0e GitLab \u8054\u624b\u63d0\u4f9b\u4e86\u8fd9\u79cd\u7c7b\u578b\u7684\u96c6\u6210\u3002<\/p>\n<p>\u6211\u4eec\u8ba4\u4e3a\u6b64\u7c7b\u96c6\u6210\u5305\u62ec\u7684\u5404\u79cd\u529f\u80fd\u53ef\u80fd\u4f1a\u5f71\u54cd\u5f00\u53d1\u8005\u5de5\u4f5c\u7684\u591a\u4e2a\u65b9\u9762 \u2013 \u4ece\u57fa\u672c\u64cd\u4f5c\u548c\u5bfc\u822a\uff0c\u5230\u5ba1\u67e5\u4ee3\u7801\u3001\u914d\u7f6e CI \u7ba1\u9053\uff0c\u4ee5\u53ca\u6784\u5efa\u548c\u90e8\u7f72\u5e94\u7528\u3002 \u5f53\u7136\uff0c\u9274\u4e8e\u6f5c\u5728\u8303\u56f4\u76f8\u5f53\u5de8\u5927\uff0c\u5fc5\u987b\u786e\u5b9a\u4f18\u5148\u4e8b\u9879\u3002 \u56e0\u6b64\uff0c\u8003\u8651\u5230\u6700\u91cd\u8981\u7684\u4efb\u52a1\u662f\u9605\u8bfb\u3001\u5bfc\u822a\u548c\u7f16\u5199\u4ee3\u7801\uff0c\u6211\u4eec\u51b3\u5b9a\u4ece IDE \u4e2d\u9002\u5f53\u7684\u5ba1\u67e5\u652f\u6301\u5f00\u59cb\u3002<\/p>\n<p>\u5408\u4f5c\u7684\u9996\u6279\u6210\u679c\u5df2\u5728 v2023.2 \u4e2d\u53d1\u5e03\uff0c\u8ba9\u60a8\u65e0\u9700\u79bb\u5f00 JetBrains IDE \u5373\u53ef\u8fdb\u884c\u5ba1\u67e5\u3002<\/p>\n<h4 class=\"wp-block-heading\">\u73b0\u5728\uff0c\u7528\u6237\u53ef\u4ee5\uff1a<\/h4>\n<ul>\n<li>\u914d\u7f6e GitLab \u5e10\u6237\u4ee5\u7528\u4e8e git \u64cd\u4f5c\u548c\u5176\u4ed6 GitLab \u4ea4\u4e92\u3002<\/li>\n<li>\u6d4f\u89c8\u3001\u7b5b\u9009\u548c\u641c\u7d22\u9879\u76ee\u4e2d\u7684\u5408\u5e76\u8bf7\u6c42\u5217\u8868\u3002<\/li>\n<li>\u8be6\u7ec6\u5ba1\u67e5\u5408\u5e76\u8bf7\u6c42\u3002<\/li>\n<li>\u76f4\u63a5\u4ece IDE \u5bf9\u4ee3\u7801\u53d1\u8868\u8bc4\u8bba\u3002<\/li>\n<li>\u5728\u4e0d\u4f7f\u7528\u6d4f\u89c8\u5668\u7684\u60c5\u51b5\u4e0b\u8bf7\u6c42\u6216\u5408\u5e76\u66f4\u6539\u3002<\/li>\n<li>\u8f7b\u677e\u5bfc\u822a\u5e76\u590d\u5236\u76f8\u5e94\u7f51\u9875\u7684\u94fe\u63a5\u3002<\/li>\n<\/ul>\n<h3 class=\"wp-block-heading\">\u914d\u7f6e GitLab \u5e10\u6237<\/h3>\n<p>\u5f53 IDE \u68c0\u6d4b\u5230\u6709 git \u8fdc\u7a0b\u6307\u5411 GitLab \u670d\u52a1\u5668\u65f6\uff0c\u4f1a\u663e\u793a\u5de6\u4fa7\u7684\u4e13\u5c5e\u5de5\u5177\u7a97\u53e3\u4ee5\u53ca\u76f8\u5173\u83dc\u5355\u4e2d\u7684\u76f8\u5e94\u64cd\u4f5c\u3002 \u4f7f\u7528\u4efb\u4f55 git \u6216 GitLab \u7279\u5b9a\u7684\u64cd\u4f5c\u90fd\u4f1a\u8981\u6c42\u60a8\u4f7f\u7528\u4ee4\u724c\u901a\u8fc7 GitLab \u5e10\u6237\u767b\u5f55\u3002 \u5982\u679c\u65e0\u6cd5\u81ea\u52a8\u68c0\u6d4b\u670d\u52a1\u5668\uff0c\u5219\u9700\u8981\u5728 <i>Settings | Version control | GitLab<\/i>\uff08\u8bbe\u7f6e | \u7248\u672c\u63a7\u5236 | GitLab\uff09\u4e2d\u624b\u52a8\u914d\u7f6e GitLab \u5e10\u6237\u3002<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/07\/GitLab-Account.png\" alt=\"\"><\/figure>\n<h3 class=\"wp-block-heading\">\u5408\u5e76\u8bf7\u6c42\u5217\u8868<\/h3>\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u5de5\u5177\u7a97\u53e3\u4f1a\u663e\u793a\u76f8\u5e94 GitLab \u4ed3\u5e93\u7684\u6240\u6709\u5408\u5e76\u8bf7\u6c42\u7684\u5217\u8868\u3002 \u60a8\u53ef\u4ee5\u4f7f\u7528\u7b5b\u9009\u5668\u6216\u7eaf\u6587\u672c\u641c\u7d22\u67e5\u627e\u9700\u8981\u7684\u5408\u5e76\u8bf7\u6c42\u3002 \u63d0\u4f9b\u9884\u5b9a\u4e49\u7b5b\u9009\u5668\u96c6\uff0c\u6700\u540e\u914d\u7f6e\u7684\u7b5b\u9009\u5668\u96c6\u5c06\u88ab\u8bb0\u4f4f\u3002<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/07\/GitLab-MR-list.png\" alt=\"\"><\/figure>\n<h3 class=\"wp-block-heading\">\u5408\u5e76\u8bf7\u6c42\u7684\u8be6\u7ec6\u4fe1\u606f<\/h3>\n<p>\u627e\u5230\u6240\u9700\u7684\u5408\u5e76\u8bf7\u6c42\u540e\uff0c\u5c06\u5176\u6253\u5f00\u4ee5\u67e5\u770b\u8be6\u7ec6\u4fe1\u606f\uff1a\u540d\u79f0\u3001\u5206\u652f\u4fe1\u606f\u3001\u66f4\u6539\u3001\u68c0\u67e5\u7ed3\u679c\u3002 \u968f\u540e\uff0c\u65f6\u95f4\u7ebf\u4f1a\u81ea\u52a8\u6253\u5f00\uff0c\u5411\u8bf7\u6c42\u7684\u6982\u89c8\u6dfb\u52a0\u66f4\u591a\u5185\u5bb9\u3002<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/07\/GitLab-Details.png\" alt=\"\"><\/figure>\n<p>\u70b9\u51fb\u5206\u652f\u6807\u7b7e\u53ef\u4ee5\u5feb\u901f\u8fc1\u51fa\u76f8\u5e94\u5206\u652f\u3002<\/p>\n<h3 class=\"wp-block-heading\">\u5e26\u6709\u6ce8\u91ca\u7684\u66f4\u6539\u548c\u5dee\u5f02<\/h3>\n<p>\u5408\u5e76\u8bf7\u6c42\u7684\u4e3b\u8981\u90e8\u5206\u662f\u5b9e\u9645\u66f4\u6539\u3002 \u5408\u5e76\u8bf7\u6c42\u4e2d\u6240\u6709\u66f4\u6539\u7684\u5217\u8868\u76f4\u63a5\u5728\u5de5\u5177\u7a97\u53e3\u4e2d\u663e\u793a\u3002 \u53cc\u51fb\u6587\u4ef6\u6253\u5f00\u5dee\u5f02\u89c6\u56fe\uff0c\u7136\u540e\u9009\u62e9\u5373\u53ef\u5728\u6587\u4ef6\u4e4b\u95f4\u5bfc\u822a\u3002 \u5e26\u6709\u6ce8\u91ca\u7684\u6587\u4ef6\u5c06\u5728\u6811\u4e2d\u5177\u6709\u76f8\u5e94\u6807\u8bb0\u3002<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/07\/GitLab-Diff.png\" alt=\"\"><\/figure>\n<p>\u8981\u68c0\u67e5\u4e2a\u522b\u63d0\u4ea4\uff0c\u8bf7\u70b9\u51fb\u63d0\u4ea4\u6570\u91cf\u5e76\u5728\u5f39\u51fa\u7a97\u53e3\u4e2d\u9009\u62e9\u9700\u8981\u7684\u63d0\u4ea4\u3002<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/07\/GitLab-Commits.png\" alt=\"\"><\/figure>\n<p>\u5982\u679c\u60a8\u5bf9\u66f4\u6539\u6216\u5468\u56f4\u7684\u4ee3\u7801\u6709\u7591\u95ee\uff0c\u53ef\u4ee5\u70b9\u51fb\u88c5\u8ba2\u533a\u57df\u4e2d\u7684\u52a0\u53f7\u56fe\u6807\u6dfb\u52a0\u6ce8\u91ca\u3002<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/07\/GitLab-Comments.png\" alt=\"\"><\/figure>\n<h3 class=\"wp-block-heading\">\u9ed8\u8ba4\u64cd\u4f5c\u4f5c\u4e3a\u4e3b\u63a7\u4ef6<\/h3>\n<p>\u6839\u636e\u7528\u6237\u89d2\u8272\u4e0e\u5408\u5e76\u8bf7\u6c42\u72b6\u6001\uff0c\u4e0b\u4e00\u6b65\u901a\u5e38\u66f4\u6709\u53ef\u80fd\u6267\u884c\u4e00\u4e2a\u64cd\u4f5c \u2013 \u4f8b\u5982\u8bf7\u6c42\u5ba1\u67e5\u3001\u63d0\u4ea4\u8bc4\u8bba\u6216\u5408\u5e76\u3002 \u96c6\u6210\u4f1a\u505a\u51fa\u51b3\u5b9a\u5e76\u663e\u793a\u4e13\u5c5e\u6267\u884c\u6309\u94ae\u3002 \u5176\u4ed6\u64cd\u4f5c\u4f4d\u4e8e More\uff08\u66f4\u591a\uff09\u83dc\u5355\u4e0b\u3002<\/p>\n<h3 class=\"wp-block-heading\">\u5c06\u5408\u5e76\u8bf7\u6c42\u5408\u5e76<\/h3>\n<p>\u6267\u884c\u5ba1\u67e5\u5e76\u5b8c\u6210\u5176\u4ed6\u5fc5\u9700\u7684\u68c0\u67e5\u540e\uff0c\u5373\u53ef\u5408\u5e76\u8bf7\u6c42\u3002 \u5728\u8fd9\u79cd\u72b6\u6001\u4e0b\uff0c\u6211\u4eec\u5c06\u5408\u5e76\u4f5c\u4e3a\u8bf7\u6c42\u7684\u4e3b\u8981\u64cd\u4f5c\u3002 \u5c06\u663e\u793a\u68c0\u67e5\u7ed3\u679c\uff0c\u544a\u77e5\u7528\u6237\u73b0\u5728\u662f\u5426\u53ef\u4ee5\u5c06\u5408\u5e76\u8bf7\u6c42\u5408\u5e76\u3002<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/07\/GitLab-Main-action.png\" alt=\"\"><\/figure>\n<h3 class=\"wp-block-heading\">\u5176\u4ed6\u5b9e\u7528\u4fe1\u606f<\/h3>\n<p>\u9664\u4e86\u5ba1\u67e5\u6d41\u652f\u6301\u4e4b\u5916\uff0c\u6211\u4eec\u8fd8\u6dfb\u52a0\u4e86\u5176\u4ed6\u5b9e\u7528\u7684\u5bfc\u822a\u64cd\u4f5c\u3002 \u73b0\u5728\uff0c\u60a8\u53ef\u4ee5\u590d\u5236 GitLab \u4e0a\u7279\u5b9a\u6587\u4ef6\u548c\u4ee3\u7801\u884c\u7684\u94fe\u63a5\uff0c\u8f7b\u677e\u4e0e\u540c\u4e8b\u5171\u4eab\u548c\u8ba8\u8bba\u3002 \u5982\u679c\u9700\u8981\uff0c\u60a8\u8fd8\u53ef\u4ee5\u76f4\u63a5\u5bfc\u822a\u5230 Web\u3002<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/07\/GitLab-Copy.png\" alt=\"\"><\/figure>\n<h3 class=\"wp-block-heading\">\u672a\u6765\u8ba1\u5212<\/h3>\n<p>\u5982\u5f00\u7bc7\u6240\u8ff0\uff0cGitLab \u4e0d\u4ec5\u4ec5\u662f\u5ba1\u67e5\u5de5\u5177\u3002 \u9664\u4e86\u8fdb\u4e00\u6b65\u589e\u5f3a\u5ba1\u67e5\u652f\u6301\u6d3b\u52a8\u5916\uff0c\u5728\u672a\u6765\u7248\u672c\u4e2d\uff0c\u6211\u4eec\u8fd8\u8ba1\u5212\u5f00\u53d1\u652f\u6301 CI \u7ba1\u9053\u914d\u7f6e\u548c\u6545\u969c\u6392\u9664\u7684\u529f\u80fd\u3002 \u656c\u8bf7\u5173\u6ce8\u66f4\u591a\u7cbe\u5f69\u66f4\u65b0\u3002<\/p>\n<h3 class=\"wp-block-heading\">\u6709\u5173\u652f\u6301\u7684\u7248\u672c\u7684\u91cd\u8981\u8bf4\u660e<\/h3>\n<p><i>\u66f4\u65b0\u65e5\u671f\uff1a2023 \u5e74 6 \u6708 27 \u65e5\u3002<\/i><\/p>\n<p>\u76ee\u524d\uff0c\u96c6\u6210\u652f\u6301 GitLab Enterprise Edition 15.10 \u53ca\u66f4\u9ad8\u7248\u672c\u3002 \u5728\u672a\u6765\u66f4\u65b0\u4e2d\uff0c\u6211\u4eec\u8ba1\u5212\u6269\u5c55\u652f\u6301\u7684\u7248\u672c\u8303\u56f4\uff0c\u6db5\u76d6 Community Edition \u548c\u66f4\u4f4e\u7248\u672c\u3002<\/p>\n<p><\/p>\n<p>\u672c\u535a\u6587\u82f1\u6587\u539f\u4f5c\u8005\uff1a<\/p>\n\n    <div class=\"about-author \">\n        <div class=\"about-author__box\">\n            <div class=\"row\">\n                <div class=\"about-author__box-img\">\n                    <img decoding=\"async\" src=\"https:\/\/secure.gravatar.com\/avatar\/?s=200&#038;r=g\" width=\"200\" height=\"200\" alt=\"\" loading=\"lazy\"  class=\"avatar avatar-200 wp-user-avatar wp-user-avatar-200 photo avatar-default\">\n                <\/div>\n                <div class=\"about-author__box-text\">\n                                                        <\/div>\n            <\/div>\n        <\/div>\n    <\/div>\n\n\n","protected":false},"author":1297,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","categories":[4089,7119,89],"tags":[],"cross-post-tag":[6284],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/blog\/380175"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/users\/1297"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/comments?post=380175"}],"version-history":[{"count":5,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/blog\/380175\/revisions"}],"predecessor-version":[{"id":380394,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/blog\/380175\/revisions\/380394"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/media?parent=380175"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/categories?post=380175"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/tags?post=380175"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/cross-post-tag?post=380175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}