{"id":1816,"date":"2023-07-14T10:39:04","date_gmt":"2023-07-14T02:39:04","guid":{"rendered":"https:\/\/qishiya.com\/?p=1816"},"modified":"2023-07-14T10:39:04","modified_gmt":"2023-07-14T02:39:04","slug":"gitlab-%e9%a1%b9%e7%9b%ae%ef%bc%88%e5%8c%85%e6%8b%ac%e6%89%80%e6%9c%89%e5%88%86%e6%94%af%ef%bc%89%e5%af%bc%e5%85%a5%e5%88%b0-github","status":"publish","type":"post","link":"https:\/\/qishiya.com\/?p=1816","title":{"rendered":"GitLab \u9879\u76ee\uff08\u5305\u62ec\u6240\u6709\u5206\u652f\uff09\u5bfc\u5165\u5230 GitHub"},"content":{"rendered":"\n<p>\u82e5\u8981\u5c06 GitLab \u9879\u76ee\uff08\u5305\u62ec\u6240\u6709\u5206\u652f\uff09\u5bfc\u5165\u5230 GitHub\uff0c\u8bf7\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u5728 GitHub \u4e0a\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u7a7a\u4ed3\u5e93<\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u8bbf\u95ee <a href=\"https:\/\/github.com\/\">GitHub<\/a> \u7f51\u7ad9\u5e76\u767b\u5f55\u3002<\/li>\n\n\n\n<li>\u70b9\u51fb\u53f3\u4e0a\u89d2\u7684 &#8220;+&#8221; \u56fe\u6807\uff0c\u7136\u540e\u9009\u62e9 &#8220;New repository&#8221;\u3002<\/li>\n\n\n\n<li>\u8f93\u5165\u4ed3\u5e93\u540d\u79f0\u3001\u63cf\u8ff0\uff0c\u5e76\u9009\u62e9\u662f\u5426\u521b\u5efa\u4e3a\u516c\u5171\u6216\u79c1\u6709\u4ed3\u5e93\u3002<\/li>\n\n\n\n<li>\u4e0d\u8981\u52fe\u9009 &#8220;Initialize this repository with a README&#8221; \u9009\u9879\u3002<\/li>\n\n\n\n<li>\u70b9\u51fb &#8220;Create repository&#8221;\u3002<\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u590d\u5236\u65b0\u521b\u5efa\u7684 GitHub \u4ed3\u5e93\u7684 URL\uff08HTTPS \u6216 SSH \u683c\u5f0f\u5747\u53ef\uff0c\u89c6\u4f60\u7684\u914d\u7f6e\u800c\u5b9a\uff09<\/li>\n\n\n\n<li>\u5728\u672c\u5730\u514b\u9686 GitLab \u4ed3\u5e93<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>   git clone --mirror &lt;your-gitlab-repo-url&gt;<\/code><\/pre>\n\n\n\n<p>\u8fd9\u4e2a\u547d\u4ee4\u4f1a\u514b\u9686 GitLab \u4ed3\u5e93\u7684\u6240\u6709\u5206\u652f\u548c\u6807\u7b7e\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"4\">\n<li>\u8fdb\u5165\u514b\u9686\u7684 GitLab \u4ed3\u5e93\u6587\u4ef6\u5939<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>   cd &lt;your-repo-name&gt;.git<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"5\">\n<li>\u6dfb\u52a0 GitHub \u4ed3\u5e93\u4f5c\u4e3a\u672c\u5730\u4ed3\u5e93\u7684\u8fdc\u7a0b\u4ed3\u5e93<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>   git remote add github &lt;your-github-repo-url&gt;<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"6\">\n<li>\u5c06\u6240\u6709\u5206\u652f\u548c\u6807\u7b7e\u63a8\u9001\u5230 GitHub \u8fdc\u7a0b\u4ed3\u5e93<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>   git push --all github\n   git push --tags github<\/code><\/pre>\n\n\n\n<p>\u5b8c\u6210\u4ee5\u4e0a\u64cd\u4f5c\u540e\uff0c\u4f60\u7684 GitLab \u9879\u76ee\u53ca\u5176\u6240\u6709\u5206\u652f\u548c\u6807\u7b7e\u90fd\u5c06\u88ab\u6210\u529f\u5bfc\u5165\u5230 GitHub\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u82e5\u8981\u5c06 GitLab \u9879\u76ee\uff08\u5305\u62ec\u6240\u6709\u5206\u652f\uff09\u5bfc\u5165\u5230 GitHub\uff0c\u8bf7\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1a \u8fd9\u4e2a\u547d\u4ee4\u4f1a\u514b\u9686 GitLab \u4ed3\u5e93\u7684\u6240\u6709\u5206\u652f\u548c\u6807\u7b7e\u3002 \u5b8c\u6210\u4ee5\u4e0a\u64cd\u4f5c\u540e\uff0c\u4f60\u7684 GitLab \u9879\u76ee\u53ca\u5176\u6240\u6709\u5206\u652f\u548c\u6807\u7b7e\u90fd\u5c06\u88ab\u6210\u529f\u5bfc\u5165\u5230 GitHub\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[589],"tags":[588],"class_list":["post-1816","post","type-post","status-publish","format-standard","hentry","category-chatgpt","tag-chatgpt"],"_links":{"self":[{"href":"https:\/\/qishiya.com\/index.php?rest_route=\/wp\/v2\/posts\/1816","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qishiya.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qishiya.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qishiya.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/qishiya.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1816"}],"version-history":[{"count":1,"href":"https:\/\/qishiya.com\/index.php?rest_route=\/wp\/v2\/posts\/1816\/revisions"}],"predecessor-version":[{"id":1817,"href":"https:\/\/qishiya.com\/index.php?rest_route=\/wp\/v2\/posts\/1816\/revisions\/1817"}],"wp:attachment":[{"href":"https:\/\/qishiya.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1816"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qishiya.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1816"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qishiya.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1816"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}