{"id":1027,"date":"2013-11-01T12:53:26","date_gmt":"2013-11-01T04:53:26","guid":{"rendered":"http:\/\/www.dogeye.net\/?p=1027"},"modified":"2013-11-01T12:53:26","modified_gmt":"2013-11-01T04:53:26","slug":"%e5%a6%82%e4%bd%95%e5%88%a0%e6%8e%89github%e4%b8%8a%e7%9a%84master%e5%88%86%e6%9e%9d","status":"publish","type":"post","link":"https:\/\/ykyi.net\/?p=1027","title":{"rendered":"\u5982\u4f55\u5220\u6389github\u4e0a\u7684master\u5206\u679d."},"content":{"rendered":"<p style=\"text-align: justify; line-height: 20px; color: rgb(0, 0, 0); font-family: sans-serif; font-size: 16px;\">\u5047\u8bbe\uff0c\u4ee3\u7801\u5df2\u7ecf\u88abclone\u5230\u4e86\u672c\u5730\u3002\u7b2c\u4e00\u6b65\u8981\u505a\u7684\u5c31\u662f\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u5206\u652f\uff0c\u6bd4\u5982placeholder\uff0c\u7136\u540e\u7528-D\u4ece\u672c\u5730\u5220\u9664master\u5206\u652f\u3002<\/p>\n<div class=\"highlight-python\" style=\"color: rgb(0, 0, 0); font-family: sans-serif; font-size: 16px; line-height: normal;\">\n<pre style=\"overflow-x: auto; overflow-y: hidden; padding: 5px; background-color: rgb(238, 255, 204); color: rgb(51, 51, 51); line-height: 15px; border-top-width: 1px; border-bottom-width: 1px; border-style: solid none; border-top-color: rgb(170, 204, 153); border-bottom-color: rgb(170, 204, 153);\">git branch placeholder\ngit checkout placeholder\ngit branch -D master<\/pre>\n<\/div>\n<p style=\"text-align: justify; line-height: 20px; color: rgb(0, 0, 0); font-family: sans-serif; font-size: 16px;\">\u5982\u679c\u73b0\u5728\u5220\u9664github\u4e0a\u7684master\uff0c\u4f1a\u62a5\u9519\uff1a<\/p>\n<div class=\"highlight-python\" style=\"color: rgb(0, 0, 0); font-family: sans-serif; font-size: 16px; line-height: normal;\">\n<pre style=\"overflow-x: auto; overflow-y: hidden; padding: 5px; background-color: rgb(238, 255, 204); color: rgb(51, 51, 51); line-height: 15px; border-top-width: 1px; border-bottom-width: 1px; border-style: solid none; border-top-color: rgb(170, 204, 153); border-bottom-color: rgb(170, 204, 153);\">git push origin :master<\/pre>\n<\/div>\n<p style=\"text-align: justify; line-height: 20px; color: rgb(0, 0, 0); font-family: sans-serif; font-size: 16px;\">\u62a5\u9519\u7ed3\u679c\u5927\u6982\u662f\u8fd9\u6837\uff1a<\/p>\n<div class=\"highlight-python\" style=\"color: rgb(0, 0, 0); font-family: sans-serif; font-size: 16px; line-height: normal;\">\n<pre style=\"overflow-x: auto; overflow-y: hidden; padding: 5px; background-color: rgb(238, 255, 204); color: rgb(51, 51, 51); line-height: 15px; border-top-width: 1px; border-bottom-width: 1px; border-style: solid none; border-top-color: rgb(170, 204, 153); border-bottom-color: rgb(170, 204, 153);\">remote: error: refusing to delete the current branch: refs\/heads\/master\nTo git@github.com:matthew-brett\/datarray.git\n! [remote rejected] master (deletion of the current branch prohibited)\nerror: failed to push some refs to &#39;git@github.com:matthew-brett\/datarray.git&#39;<\/pre>\n<\/div>\n<p style=\"text-align: justify; line-height: 20px; color: rgb(0, 0, 0); font-family: sans-serif; font-size: 16px;\">\u6b63\u786e\u5730\u505a\u6cd5\u662f\u5148checkout\u5230\u65b0\u5efa\u7684placeholder\u5206\u652f\u3002\u7136\u540e\u628aplaceholder\u63a8\u9001\u5230github\u4e0a\u3002<\/p>\n<div class=\"highlight-python\" style=\"color: rgb(0, 0, 0); font-family: sans-serif; font-size: 16px; line-height: normal;\">\n<pre style=\"overflow-x: auto; overflow-y: hidden; padding: 5px; background-color: rgb(238, 255, 204); color: rgb(51, 51, 51); line-height: 15px; border-top-width: 1px; border-bottom-width: 1px; border-style: solid none; border-top-color: rgb(170, 204, 153); border-bottom-color: rgb(170, 204, 153);\">git checkout placeholder # if not on placeholder already\ngit push origin placeholder<\/pre>\n<\/div>\n<p style=\"text-align: justify; line-height: 20px; color: rgb(0, 0, 0); font-family: sans-serif; font-size: 16px;\">\u4ecegithub\u7684web\u7aef\u5165\u5230\u5de5\u7a0b\u7684setting\u754c\u9762\uff0c\u6709\u4e2a\u5730\u65b9\u53ef\u4ee5\u66f4\u6539\u9ed8\u8ba4\u7684\u5206\u652f\uff0c\u7528\u53e6\u4e00\u4e2a\u5206\u652f\u505a\u9ed8\u8ba4\u5206\u652f\uff0c\u800c\u4e0d\u662fmaster\u3002\u73b0\u5728\u5c31\u53ef\u4ee5\u4ece\u5220\u6389master\u4e86<\/p>\n<div class=\"highlight-python\" style=\"color: rgb(0, 0, 0); font-family: sans-serif; font-size: 16px; line-height: normal;\">\n<pre style=\"overflow-x: auto; overflow-y: hidden; padding: 5px; background-color: rgb(238, 255, 204); color: rgb(51, 51, 51); line-height: 15px; border-top-width: 1px; border-bottom-width: 1px; border-style: solid none; border-top-color: rgb(170, 204, 153); border-bottom-color: rgb(170, 204, 153);\">git push origin :master<\/pre>\n<\/div>\n<p>\u53e6\uff0c\u600e\u4e48\u7ed9github\u4e0a\u4e00\u4e2atag\u66f4\u540d\u7b49:<\/p>\n<pre style=\"margin-top: 0px; margin-bottom: 10px; padding: 5px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: rgb(238, 238, 238); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; overflow: auto; width: auto; max-height: 600px; word-wrap: normal; color: rgb(0, 0, 0); line-height: 18px;\"><span style=\"color: rgb(68, 68, 68); font-family: 'Open Sans', 'Helvetica Nueue', sans-serif; font-size: 15px; line-height: 22px;\">1) \u5220\u9664\u672c\u5730\u7684\u4e00\u4e2atag:&nbsp;<\/span><code style=\"border: 0px; font-family: Consolas, 'Andale Mono', 'DejaVu Sans Mono', monospace; font-size: 14px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; line-height: normal; color: rgb(68, 68, 68);\">git tag -d v0.4<\/code>\n<span style=\"color: rgb(68, 68, 68); font-family: 'Open Sans', 'Helvetica Nueue', sans-serif; font-size: 15px; line-height: 22px;\">2) \u5220\u9664GitHub\u4e0a\u4e00\u4e2atag (\u8fd9\u4f1a\u5220\u9664\u6389\u4e0b\u8f7d\u94fe\u63a5):&nbsp;<\/span><code style=\"border: 0px; font-family: Consolas, 'Andale Mono', 'DejaVu Sans Mono', monospace; font-size: 14px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; line-height: normal; color: rgb(68, 68, 68);\">git push origin :v0.4<\/code>\n<span style=\"color: rgb(68, 68, 68); font-family: 'Open Sans', 'Helvetica Nueue', sans-serif; font-size: 15px; line-height: 22px;\">3) \u7ed9\u5f53\u524dbranch\u6253\u6807\u7b7e:&nbsp;<\/span><code style=\"border: 0px; font-family: Consolas, 'Andale Mono', 'DejaVu Sans Mono', monospace; font-size: 14px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; line-height: normal; color: rgb(68, 68, 68);\">git tag -a v0.5 -m &quot;Version 0.5 Stable&quot;<\/code>\n<span style=\"color: rgb(68, 68, 68); font-family: 'Open Sans', 'Helvetica Nueue', sans-serif; font-size: 15px; line-height: 22px;\">4) \u628a\u6240\u6709tag\u63a8\u4e0agithub(two dashes):&nbsp;<\/span><code style=\"border: 0px; font-family: Consolas, 'Andale Mono', 'DejaVu Sans Mono', monospace; font-size: 14px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; line-height: normal; color: rgb(68, 68, 68);\">git push --tags<\/code><\/pre>\n<p><span style=\"color: rgb(0, 0, 0); font-family: Verdana, Geneva, sans-serif; font-size: 16px; line-height: 22px;\">copyright ykyi.net<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5047\u8bbe\uff0c\u4ee3\u7801\u5df2\u7ecf\u88abclone\u5230\u4e86\u672c\u5730\u3002\u7b2c\u4e00\u6b65\u8981\u505a\u7684\u5c31\u662f\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u5206\u652f\uff0c\u6bd4\u5982placeholder\uff0c\u7136\u540e\u7528-D\u4ece\u672c\u5730\u5220\u9664master\u5206\u652f\u3002 git branch placeholder git checkout placeholder git branch -D master \u5982\u679c\u73b0\u5728\u5220\u9664github\u4e0a\u7684master\uff0c\u4f1a\u62a5\u9519\uff1a git push origin :master \u62a5\u9519\u7ed3\u679c\u5927\u6982\u662f\u8fd9\u6837\uff1a remote: error: refusing to delete the current branch: refs\/heads\/master To git@github.com:matthew-brett\/datarray.git ! [remote rejected] master (deletion of the current branch prohibited) error: failed to push some refs to &#39;git@github.com:matthew-brett\/datarray.git&#39; \u6b63\u786e\u5730\u505a\u6cd5\u662f\u5148checkout\u5230\u65b0\u5efa\u7684placeholder\u5206\u652f\u3002\u7136\u540e\u628aplaceholder\u63a8\u9001\u5230github\u4e0a\u3002 git checkout placeholder # if not on placeholder &hellip; <a href=\"https:\/\/ykyi.net\/?p=1027\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;\u5982\u4f55\u5220\u6389github\u4e0a\u7684master\u5206\u679d.&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[36],"class_list":["post-1027","post","type-post","status-publish","format-standard","hentry","category-tech_articles","tag-git"],"_links":{"self":[{"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/posts\/1027","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ykyi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1027"}],"version-history":[{"count":0,"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/posts\/1027\/revisions"}],"wp:attachment":[{"href":"https:\/\/ykyi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1027"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ykyi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1027"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ykyi.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1027"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}