{"id":7426,"date":"2015-06-23T15:30:34","date_gmt":"2015-06-23T07:30:34","guid":{"rendered":"http:\/\/jpuyy.com\/?p=7426"},"modified":"2015-07-12T08:50:09","modified_gmt":"2015-07-12T00:50:09","slug":"git-branch","status":"publish","type":"post","link":"https:\/\/jpuyy.com\/?p=7426","title":{"rendered":"git branch tag"},"content":{"rendered":"<p>\u521b\u5efa branch<\/p>\n<pre>git branch cat<\/pre>\n<p>\u5207\u6362\u5230<\/p>\n<pre>git checkout cat<\/pre>\n<p>\u8fd9\u65f6HEAD \u5df2\u7ecf\u5230 cat<\/p>\n<p>\u5728 master \u4e0a\u5408\u5e76 cat<\/p>\n<pre>git merge cat<\/pre>\n<p>\u5220\u9664 cat \u5206\u652f<\/p>\n<pre>git branch -d cat<\/pre>\n<p>\u521b\u5efa\u5206\u652f\u5e76\u5207\u6362<\/p>\n<pre>git checkout -b admin<\/pre>\n<p>\u5efa\u7acb\u672c\u5730\u5206\u652f develop<\/p>\n<pre>git checkout -b develop<\/pre>\n<p>\u67e5\u770b\u672c\u5730\u5404\u5206\u652f\u7684\u6700\u540e\u4e00\u6b21\u63d0\u4ea4<\/p>\n<pre>git branch -v<\/pre>\n<p>\u5efa\u7acb\u8fdc\u7aef\u5206\u652f remote branch<\/p>\n<pre>git push origin develop<\/pre>\n<p>\u5f53\u53e6\u4e00\u4e2a\u4eba\u5728\u672c\u5730<\/p>\n<p>git pull \u7684\u65f6\u5019\uff0c\u4f1a\u6709\u63d0\u793a\u591a\u4e86\u4e00\u4e2a\u5206\u652f\uff0c\u4f46\u662f\u4ed6\u672c\u5730\u5e76\u6ca1\u6709\u65b0\u5efa develop<\/p>\n<p>git branch -r \u67e5\u770b\u8fdc\u7aef\u5206\u652f<\/p>\n<p>\u68c0\u51fa\u8fd9\u4e2a\u5206\u652f<\/p>\n<pre>git checkout develop<\/pre>\n<p>\u67e5\u770b\u672c\u5730\u548c\u8fdc\u7a0b\u5206\u652f\u60c5\u51b5<\/p>\n<pre>git remote show origin<\/pre>\n<p>\u5220\u9664\u8fdc\u7aef\u5206\u652f<\/p>\n<pre>git push origin :develop<\/pre>\n<p>\u5220\u9664\u672c\u5730\u5206\u652f\uff0c\u7528 -D<\/p>\n<pre>git branch -D develop<\/pre>\n<p>\u5bf9\u4e8e\u5df2\u7ecf\u5220\u9664\u7684\u0005\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e develop \u5206\u652f\uff0c \u5728\u672c\u5730\u7684 develop \u4e0b git push \u540e\uff0c\u4f1a\u63d0\u793a Everything up-to-date<\/p>\n<pre>git remote show origin<\/pre>\n<p>\u8fd9\u65f6\u8981\u505a<\/p>\n<pre>git remote prune origin<\/pre>\n<p>\u5c06\u8fdc\u7aef\u6e05\u7406<\/p>\n<p>tag \u76f8\u5f53\u4e8e commit \uff0c\u7ecf\u5e38\u7528\u4e8e release<\/p>\n<pre>git tag<\/pre>\n<pre>git checkout v0.0.1<\/pre>\n<p>\u6dfb\u52a0\u65b0 tag<\/p>\n<pre>git tag -a v0.0.3 -m \"version 0.0.3\"<\/pre>\n<p>\u63a8\u9001tag\u5230\u8fdc\u7aef<\/p>\n<pre>git push --tags<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u521b\u5efa branch git branch cat \u5207\u6362\u5230 git checkout cat \u8fd9\u65f6HEAD \u5df2\u7ecf\u5230 cat \u5728 master \u4e0a\u5408\u5e76 cat git merge cat \u5220\u9664 cat \u5206\u652f git branch -d cat \u521b\u5efa\u5206\u652f\u5e76\u5207\u6362 git checkout -b admin \u5efa\u7acb\u672c\u5730\u5206\u652f develop git checkout -b develop \u67e5\u770b\u672c\u5730\u5404\u5206\u652f\u7684\u6700\u540e\u4e00\u6b21\u63d0\u4ea4 git branch -v \u5efa\u7acb\u8fdc\u7aef\u5206\u652f remote branch git push origin develop \u5f53\u53e6\u4e00\u4e2a\u4eba\u5728\u672c\u5730 git pull \u7684\u65f6\u5019\uff0c\u4f1a\u6709\u63d0\u793a\u591a\u4e86\u4e00\u4e2a\u5206\u652f\uff0c\u4f46\u662f\u4ed6\u672c\u5730\u5e76\u6ca1\u6709\u65b0\u5efa develop git branch [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[168],"tags":[],"class_list":["post-7426","post","type-post","status-publish","format-standard","hentry","category-git"],"_links":{"self":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/7426","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7426"}],"version-history":[{"count":14,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/7426\/revisions"}],"predecessor-version":[{"id":7484,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/7426\/revisions\/7484"}],"wp:attachment":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7426"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7426"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7426"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}