{"id":463,"date":"2011-10-04T11:38:30","date_gmt":"2011-10-04T18:38:30","guid":{"rendered":"http:\/\/www.cchsu.com\/arthur\/?page_id=463"},"modified":"2011-10-04T11:38:30","modified_gmt":"2011-10-04T18:38:30","slug":"gitsvn-commands","status":"publish","type":"page","link":"http:\/\/www.cchsu.com\/arthur\/digest\/gitsvn-commands\/","title":{"rendered":"git\/svn \u6307\u4ee4\u901f\u67e5"},"content":{"rendered":"<p>git clone <i>&lt;url&gt;<\/i> <i>&lt;folder&gt;<\/i> \u8a2d\u5b9a git repo<br \/>\ngit checkout -B <i>&lt;branch&gt;<\/i> \u5efa\u4e00\u500b\u65b0\u7684 branch<br \/>\ngit branch \u5217\u51fa branch \u8cc7\u8a0a<br \/>\ngit branch <i>&lt;branch&gt;<\/i> \u5207\u63db\u81f3\u65b0\u7684 branch<br \/>\ngit add <i>&lt;path\/to\/file&gt;<\/i> \u5c07\u6a94\u6848\u52a0\u81f3 working branch<br \/>\ngit rm <i>&lt;path\/to\/file&gt;<\/i> \u522a\u9664\u6a94\u6848<br \/>\ngit checkout &#8212; <i>&lt;path\/to\/file&gt;<\/i> \u653e\u68c4\u5c0d\u6a94\u6848\u7684\u4fee\u6539<br \/>\ngit stash \u628a\u672a commit \u7684 change \u66ab\u6642\u585e\u5230\u4e00\u908a\uff0c\u642d\u914d git stash drop \u53ef\u7528\u65bc\u6574\u6279\u653e\u68c4<\/p>\n<p>git svn clone -r HEAD <i>&lt;svn_depo_url&gt;<\/i> <i>folder<\/i> \u8a2d\u5b9a git-svn depo<br \/>\ngit svn fetch -r HEAD \u6293\u53d6 svn repo \u5167\u5bb9<br \/>\ngit svn rebase \u540c\u6b65 svn\/git<\/p>\n","protected":false},"excerpt":{"rendered":"<p>git clone &lt;url&gt; &lt;folder&gt; \u8a2d\u5b9a git repo git checkout -B &lt;branch&gt; \u5efa\u4e00\u500b\u65b0\u7684 branch git branch \u5217\u51fa branch \u8cc7\u8a0a git branch &lt;branch&gt; \u5207\u63db\u81f3\u65b0\u7684 branch git add &lt;path\/to\/file&gt; \u5c07\u6a94\u6848\u52a0\u81f3 working branch git rm &lt;path\/to\/file&gt; \u522a\u9664\u6a94\u6848 git checkout &#8212; &lt;path\/to\/file&gt; \u653e\u68c4\u5c0d\u6a94\u6848\u7684\u4fee\u6539 git stash \u628a\u672a commit \u7684 change \u66ab\u6642\u585e\u5230\u4e00\u908a\uff0c\u642d\u914d git stash drop \u53ef\u7528\u65bc\u6574\u6279\u653e\u68c4 git svn clone -r HEAD &lt;svn_depo_url&gt; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":101,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"footnotes":""},"_links":{"self":[{"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/pages\/463"}],"collection":[{"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/comments?post=463"}],"version-history":[{"count":2,"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/pages\/463\/revisions"}],"predecessor-version":[{"id":465,"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/pages\/463\/revisions\/465"}],"up":[{"embeddable":true,"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/pages\/101"}],"wp:attachment":[{"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/media?parent=463"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}