-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocs__myblog__devneeds__svn.md.js
More file actions
1 lines (1 loc) · 18.7 KB
/
docs__myblog__devneeds__svn.md.js
File metadata and controls
1 lines (1 loc) · 18.7 KB
1
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[48],{GyxP:function(e,n,a){"use strict";a.r(n);var t=a("q1tI"),c=a.n(t),i=a("dEAq"),r=a("H1Ra"),l=c.a.memo((e=>{e.demos;return c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{className:"markdown"},c.a.createElement("h2",{id:"svn-\u547d\u4ee4\u884c"},c.a.createElement(i["AnchorLink"],{to:"#svn-\u547d\u4ee4\u884c","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"svn \u547d\u4ee4\u884c"),c.a.createElement("h3",{id:"\u9996\u5148\u5728-centos-\u6216\u8005-macos-\u4e0a\u4e0b\u8f7d-svn"},c.a.createElement(i["AnchorLink"],{to:"#\u9996\u5148\u5728-centos-\u6216\u8005-macos-\u4e0a\u4e0b\u8f7d-svn","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"\u9996\u5148\u5728 CentOS \u6216\u8005 MacOs \u4e0a\u4e0b\u8f7d svn"),c.a.createElement(r["a"],{code:"yum install svn",lang:"bash"}),c.a.createElement("p",null,c.a.createElement(i["AnchorLink"],{to:"/devneeds/macinstall.html#%E5%AE%89%E8%A3%85svn%E5%91%BD%E4%BB%A4%E8%A1%8C"},"mac \u5b89\u88c5\u6559\u7a0b")),c.a.createElement("p",null,"\u521b\u5efa\u7248\u672c\u5e93\u53ef\u4ee5\u53c2\u8003",c.a.createElement(i["Link"],{to:"https://www.runoob.com/svn/svn-create-repo.html"},"\u83dc\u9e1f\u6559\u7a0b")),c.a.createElement("h3",{id:"svn-\u547d\u4ee4\u6c47\u603b\u5982\u679c\u6709\u6f0f\u6389\u7684\u4f1a\u4e0d\u5b9a\u671f\u66f4\u65b0"},c.a.createElement(i["AnchorLink"],{to:"#svn-\u547d\u4ee4\u6c47\u603b\u5982\u679c\u6709\u6f0f\u6389\u7684\u4f1a\u4e0d\u5b9a\u671f\u66f4\u65b0","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"svn \u547d\u4ee4\u6c47\u603b(\u5982\u679c\u6709\u6f0f\u6389\u7684\uff0c\u4f1a\u4e0d\u5b9a\u671f\u66f4\u65b0~~)"),c.a.createElement(r["a"],{code:"# \u540c\u65f6\u88c5\u4e86\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u5668\u7aef\n# \u521b\u5efa\u7248\u672c\u5e93\nsvnadmin create /opt/svn/runoob\n\n#\u65b0\u521b\u5efa\u9879\u76ee\nsvn mkdir \u7ebf\u4e0asvn\u5730\u5740 -m \u201cmkdir\u201d\n#\u6216\u8005\u672c\u5730\u64cd\u4f5c\nsvn mkdir file:///data/repos/ -m \u201cmkdir\u201d\n\n\n# \u4e0b\u8f7d\u9879\u76ee\nsvn checkout svn\u5730\u5740 --username=\u7528\u6237\u540d --password=\u5bc6\u7801\n\n#\u67e5\u770b\u6587\u4ef6\u6216\u8005\u76ee\u5f55\u72b6\u6001\nsvn status\n\n# \u6dfb\u52a0\u5355\u4e2a\u6587\u4ef6\n# \u4f8b\u5982 svn add /src/pages/Loading\nsvn add file\n\n# \u6dfb\u52a0\u591a\u4e2a\u6587\u4ef6\nsvn add *\n\n#\u5220\u9664\u6587\u4ef6\n#\u4f8b\u5982 svn delete /src/pages/Loading\nsvn delete file\n\n# \u63d0\u4ea4\nsvn commit -m '\u66f4\u65b0\u8bf4\u660e'\n\n# \u5ffd\u7565\u6587\u4ef6\u4e0d\u52a0\u5165\u5230\u7248\u672c\u63a7\u5236\n# \u4f8b\u5982 svn propedit svn:ignore node_modules\nsvn propedit svn:ignore \u76ee\u5f55\u540d\u79f0\n\nsvn branch \u5206\u652f\u540d(add/commit)\u3002\nsvn merge \u4e3b\u5e72svn\u5730\u5740 \u5206\u652fsvn\u5730\u5740\u3002\nBeyond Compare -> svn resolved\u3002\nsvn copy \u4e3b\u5e72SVN\u5730\u5740 /tags/2017",lang:"bash"}),c.a.createElement("h2",{id:"git-\u547d\u4ee4\u884c"},c.a.createElement(i["AnchorLink"],{to:"#git-\u547d\u4ee4\u884c","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"git \u547d\u4ee4\u884c"),c.a.createElement("p",null,"mac \u7535\u8111\u9ed8\u8ba4\u5b89\u88c5 git\uff0cwindows \u9700\u8981\u4e0b\u8f7d\u5bf9\u5e94\u7684\u63d2\u4ef6\u5b89\u88c5"),c.a.createElement("h3",{id:"1\u521d\u59cb\u5316\u672c\u5730-git-\u5b58\u50a8\u5e93"},c.a.createElement(i["AnchorLink"],{to:"#1\u521d\u59cb\u5316\u672c\u5730-git-\u5b58\u50a8\u5e93","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"1\u3001\u521d\u59cb\u5316\u672c\u5730 git \u5b58\u50a8\u5e93"),c.a.createElement(r["a"],{code:"git init",lang:"bash"}),c.a.createElement("h3",{id:"2\u521b\u5efa\u8fdc\u7a0b\u5b58\u50a8\u5e93\u7684\u672c\u5730\u526f\u672c"},c.a.createElement(i["AnchorLink"],{to:"#2\u521b\u5efa\u8fdc\u7a0b\u5b58\u50a8\u5e93\u7684\u672c\u5730\u526f\u672c","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"2\u3001\u521b\u5efa\u8fdc\u7a0b\u5b58\u50a8\u5e93\u7684\u672c\u5730\u526f\u672c"),c.a.createElement(r["a"],{code:"git clone [git\u670d\u52a1\u5730\u5740]",lang:"bash"}),c.a.createElement("h3",{id:"3\u68c0\u67e5\u72b6\u6001"},c.a.createElement(i["AnchorLink"],{to:"#3\u68c0\u67e5\u72b6\u6001","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"3\u3001\u68c0\u67e5\u72b6\u6001"),c.a.createElement(r["a"],{code:"git status",lang:"bash"}),c.a.createElement("h3",{id:"4\u5c06\u6587\u4ef6\u6dfb\u52a0\u5230\u6682\u5b58\u533a"},c.a.createElement(i["AnchorLink"],{to:"#4\u5c06\u6587\u4ef6\u6dfb\u52a0\u5230\u6682\u5b58\u533a","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"4\u3001\u5c06\u6587\u4ef6\u6dfb\u52a0\u5230\u6682\u5b58\u533a"),c.a.createElement(r["a"],{code:"# \u6dfb\u52a0\u5355\u4e2a\u6587\u4ef6\ngit add [file-name.txt]\n# \u6dfb\u52a0\u6240\u6709\u4fee\u6539\u7684\u6587\u4ef6\ngit add .",lang:"bash"}),c.a.createElement("h3",{id:"5\u5c06\u6240\u6709\u65b0\u6587\u4ef6\u548c\u66f4\u6539\u8fc7\u7684\u6587\u4ef6\u6dfb\u52a0\u5230\u767b\u53f0\u533a\u57df"},c.a.createElement(i["AnchorLink"],{to:"#5\u5c06\u6240\u6709\u65b0\u6587\u4ef6\u548c\u66f4\u6539\u8fc7\u7684\u6587\u4ef6\u6dfb\u52a0\u5230\u767b\u53f0\u533a\u57df","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"5\u3001\u5c06\u6240\u6709\u65b0\u6587\u4ef6\u548c\u66f4\u6539\u8fc7\u7684\u6587\u4ef6\u6dfb\u52a0\u5230\u767b\u53f0\u533a\u57df"),c.a.createElement(r["a"],{code:"git add -A",lang:"bash"}),c.a.createElement("h3",{id:"6\u63d0\u4ea4\u66f4\u6539"},c.a.createElement(i["AnchorLink"],{to:"#6\u63d0\u4ea4\u66f4\u6539","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"6\u3001\u63d0\u4ea4\u66f4\u6539"),c.a.createElement(r["a"],{code:'git commit -m "[commit message]"',lang:"bash"}),c.a.createElement("h3",{id:"7\u5220\u9664\u6587\u4ef6"},c.a.createElement(i["AnchorLink"],{to:"#7\u5220\u9664\u6587\u4ef6","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"7\u3001\u5220\u9664\u6587\u4ef6"),c.a.createElement(r["a"],{code:"git rm -r [file-name.txt]",lang:"bash"}),c.a.createElement("h3",{id:"8\u5217\u51fa\u5206\u652f"},c.a.createElement(i["AnchorLink"],{to:"#8\u5217\u51fa\u5206\u652f","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"8\u3001\u5217\u51fa\u5206\u652f"),c.a.createElement(r["a"],{code:"git branch",lang:"bash"}),c.a.createElement("h3",{id:"9\u521b\u5efa\u4e00\u4e2a\u65b0\u5206\u652f"},c.a.createElement(i["AnchorLink"],{to:"#9\u521b\u5efa\u4e00\u4e2a\u65b0\u5206\u652f","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"9\u3001\u521b\u5efa\u4e00\u4e2a\u65b0\u5206\u652f"),c.a.createElement(r["a"],{code:"git branch [branch name]",lang:"bash"}),c.a.createElement("h3",{id:"10\u5220\u9664\u5206\u652f"},c.a.createElement(i["AnchorLink"],{to:"#10\u5220\u9664\u5206\u652f","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"10\u3001\u5220\u9664\u5206\u652f"),c.a.createElement(r["a"],{code:"git branch -d [branch name]",lang:"bash"}),c.a.createElement("h3",{id:"11\u521b\u5efa\u4e00\u4e2a\u65b0\u5206\u652f\u5e76\u5207\u6362\u5230\u8be5\u5206\u652f"},c.a.createElement(i["AnchorLink"],{to:"#11\u521b\u5efa\u4e00\u4e2a\u65b0\u5206\u652f\u5e76\u5207\u6362\u5230\u8be5\u5206\u652f","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"11\u3001\u521b\u5efa\u4e00\u4e2a\u65b0\u5206\u652f\u5e76\u5207\u6362\u5230\u8be5\u5206\u652f"),c.a.createElement(r["a"],{code:"git checkout -b [branch name]",lang:"bash"}),c.a.createElement("h3",{id:"12\u514b\u9686\u4e00\u4e2a\u8fdc\u7a0b\u5206\u652f\u5e76\u5207\u6362\u5230\u8be5\u5206\u652f"},c.a.createElement(i["AnchorLink"],{to:"#12\u514b\u9686\u4e00\u4e2a\u8fdc\u7a0b\u5206\u652f\u5e76\u5207\u6362\u5230\u8be5\u5206\u652f","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"12\u3001\u514b\u9686\u4e00\u4e2a\u8fdc\u7a0b\u5206\u652f\u5e76\u5207\u6362\u5230\u8be5\u5206\u652f"),c.a.createElement(r["a"],{code:"git checkout -b [\u672c\u5730\u5206\u652f\u540d] origin/[\u8fdc\u7a0b\u5206\u652f\u540d]",lang:"bash"}),c.a.createElement("h3",{id:"13\u91cd\u547d\u540d\u672c\u5730\u5206\u652f"},c.a.createElement(i["AnchorLink"],{to:"#13\u91cd\u547d\u540d\u672c\u5730\u5206\u652f","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"13\u3001\u91cd\u547d\u540d\u672c\u5730\u5206\u652f"),c.a.createElement(r["a"],{code:"git branch -m [old branch name] [new branch name]",lang:"bash"}),c.a.createElement("h3",{id:"14\u5207\u6362\u5230\u5206\u652f"},c.a.createElement(i["AnchorLink"],{to:"#14\u5207\u6362\u5230\u5206\u652f","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"14\u3001\u5207\u6362\u5230\u5206\u652f"),c.a.createElement(r["a"],{code:"git checkout [branch name]",lang:"bash"}),c.a.createElement("h3",{id:"15\u5c06\u4e00\u4e2a\u5206\u652f\u5408\u5e76\u5230\u6d3b\u52a8\u5206\u652f\u4e2d"},c.a.createElement(i["AnchorLink"],{to:"#15\u5c06\u4e00\u4e2a\u5206\u652f\u5408\u5e76\u5230\u6d3b\u52a8\u5206\u652f\u4e2d","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"15\u3001\u5c06\u4e00\u4e2a\u5206\u652f\u5408\u5e76\u5230\u6d3b\u52a8\u5206\u652f\u4e2d"),c.a.createElement(r["a"],{code:"git merge [branch name]",lang:"bash"}),c.a.createElement("h3",{id:"16\u5c06\u4e00\u4e2a\u5206\u652f\u5408\u5e76\u5230\u4e00\u4e2a\u76ee\u6807\u5206\u652f"},c.a.createElement(i["AnchorLink"],{to:"#16\u5c06\u4e00\u4e2a\u5206\u652f\u5408\u5e76\u5230\u4e00\u4e2a\u76ee\u6807\u5206\u652f","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"16\u3001\u5c06\u4e00\u4e2a\u5206\u652f\u5408\u5e76\u5230\u4e00\u4e2a\u76ee\u6807\u5206\u652f"),c.a.createElement(r["a"],{code:"git merge [source branch] [target branch]",lang:"bash"}),c.a.createElement("h3",{id:"17\u5c06\u66f4\u6539\u5b58\u50a8\u5728\u4e0d\u5408\u9002\u7684\u5de5\u4f5c\u76ee\u5f55\u4e2d"},c.a.createElement(i["AnchorLink"],{to:"#17\u5c06\u66f4\u6539\u5b58\u50a8\u5728\u4e0d\u5408\u9002\u7684\u5de5\u4f5c\u76ee\u5f55\u4e2d","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"17\u3001\u5c06\u66f4\u6539\u5b58\u50a8\u5728\u4e0d\u5408\u9002\u7684\u5de5\u4f5c\u76ee\u5f55\u4e2d"),c.a.createElement(r["a"],{code:"git stash",lang:"bash"}),c.a.createElement("h3",{id:"18\u5220\u9664\u6240\u6709\u9690\u85cf\u7684\u6761\u76ee"},c.a.createElement(i["AnchorLink"],{to:"#18\u5220\u9664\u6240\u6709\u9690\u85cf\u7684\u6761\u76ee","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"18\u3001\u5220\u9664\u6240\u6709\u9690\u85cf\u7684\u6761\u76ee"),c.a.createElement(r["a"],{code:"git stash clear",lang:"bash"}),c.a.createElement("h3",{id:"19\u5c06\u5206\u652f\u63a8\u9001\u5230\u4f60\u7684\u8fdc\u7a0b\u5b58\u50a8\u5e93"},c.a.createElement(i["AnchorLink"],{to:"#19\u5c06\u5206\u652f\u63a8\u9001\u5230\u4f60\u7684\u8fdc\u7a0b\u5b58\u50a8\u5e93","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"19\u3001\u5c06\u5206\u652f\u63a8\u9001\u5230\u4f60\u7684\u8fdc\u7a0b\u5b58\u50a8\u5e93"),c.a.createElement(r["a"],{code:"git push origin [branch name]",lang:"bash"}),c.a.createElement("h3",{id:"20\u5c06\u66f4\u6539\u63a8\u9001\u5230\u8fdc\u7a0b\u5b58\u50a8\u5e93"},c.a.createElement(i["AnchorLink"],{to:"#20\u5c06\u66f4\u6539\u63a8\u9001\u5230\u8fdc\u7a0b\u5b58\u50a8\u5e93","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"20\u3001\u5c06\u66f4\u6539\u63a8\u9001\u5230\u8fdc\u7a0b\u5b58\u50a8\u5e93"),c.a.createElement(r["a"],{code:"git push",lang:"bash"}),c.a.createElement("h3",{id:"21\u5c06\u672c\u5730\u5b58\u50a8\u5e93\u66f4\u65b0\u4e3a\u6700\u65b0\u7684\u63d0\u4ea4"},c.a.createElement(i["AnchorLink"],{to:"#21\u5c06\u672c\u5730\u5b58\u50a8\u5e93\u66f4\u65b0\u4e3a\u6700\u65b0\u7684\u63d0\u4ea4","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"21\u3001\u5c06\u672c\u5730\u5b58\u50a8\u5e93\u66f4\u65b0\u4e3a\u6700\u65b0\u7684\u63d0\u4ea4"),c.a.createElement(r["a"],{code:"git pull",lang:"bash"}),c.a.createElement("h3",{id:"22\u4ece\u8fdc\u7a0b\u5b58\u50a8\u5e93\u4e2d\u63d0\u53d6\u66f4\u6539"},c.a.createElement(i["AnchorLink"],{to:"#22\u4ece\u8fdc\u7a0b\u5b58\u50a8\u5e93\u4e2d\u63d0\u53d6\u66f4\u6539","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"22\u3001\u4ece\u8fdc\u7a0b\u5b58\u50a8\u5e93\u4e2d\u63d0\u53d6\u66f4\u6539"),c.a.createElement(r["a"],{code:"git pull origin [branch name]",lang:"bash"}),c.a.createElement("h3",{id:"23\u6dfb\u52a0\u4e00\u4e2a\u8fdc\u7a0b\u5b58\u50a8\u5e93"},c.a.createElement(i["AnchorLink"],{to:"#23\u6dfb\u52a0\u4e00\u4e2a\u8fdc\u7a0b\u5b58\u50a8\u5e93","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"23\u3001\u6dfb\u52a0\u4e00\u4e2a\u8fdc\u7a0b\u5b58\u50a8\u5e93"),c.a.createElement(r["a"],{code:"git remote add origin ssh://git@github.com/[username]/[repository-name].git",lang:"bash"}),c.a.createElement("h3",{id:"24\u67e5\u770b\u66f4\u6539"},c.a.createElement(i["AnchorLink"],{to:"#24\u67e5\u770b\u66f4\u6539","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"24\u3001\u67e5\u770b\u66f4\u6539"),c.a.createElement(r["a"],{code:"git log",lang:"bash"}),c.a.createElement("h3",{id:"24\u5408\u5e76\u524d\u9884\u89c8\u66f4\u6539"},c.a.createElement(i["AnchorLink"],{to:"#24\u5408\u5e76\u524d\u9884\u89c8\u66f4\u6539","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"24\u3001\u5408\u5e76\u524d\u9884\u89c8\u66f4\u6539"),c.a.createElement(r["a"],{code:"git diff [source branch] [target branch]",lang:"bash"}),c.a.createElement("h2",{id:"git-\u591a\u5206\u652f\u5f00\u53d1"},c.a.createElement(i["AnchorLink"],{to:"#git-\u591a\u5206\u652f\u5f00\u53d1","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"git \u591a\u5206\u652f\u5f00\u53d1"),c.a.createElement(r["a"],{code:"# \u521b\u5efa\u81ea\u5df1\u7684\u5206\u5b50\u5e76\u628a\u8fdc\u7a0b\u5206\u652f\u7684\u4ee3\u7801\u62c9\u5230\u672c\u5730\n\n# \u521b\u5efa\u672c\u5730\u5206\u652f \u6ce8\u610f\uff1a\u8be5\u5206\u652f\u53ea\u5728\u672c\u5730\u51fa\u73b0\uff0c\u8fd8\u6ca1\u6709\u63d0\u4ea4\u5230\u8fdc\u7a0b\u670d\u52a1\u4e0a\n# \u4f8b\u5982 git checkout -b test\ngit checkout -b [\u672c\u5730\u5206\u652f]\n# \u62c9\u53d6\u8fdc\u7a0b\u5206\u652f\u5230\u672c\u5730\u5206\u652f\ngit pull origin [\u8fdc\u7a0b\u5206\u652f]\n# \u4fee\u6539\u65b0\u521b\u5efa\u7684\u672c\u5730\u5206\u652f\u7684\u4ee3\u7801\uff0c\u5e76\u63d0\u4ea4\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\n# \u4f8b\u5982 git push origin test \u8fdc\u7a0b\u5206\u652f\u5c31\u4f1a\u6709\u4e00\u4e2atest\u5206\u652f\uff08\n# \u6ce8\u610f\uff1a\u672c\u5730\u5206\u652f\u63a8\u9001\u7684\u65f6\u5019\u4e0d\u80fd\u6539\u540d\uff0c\u610f\u601d\u5c31\u662f\u672c\u5730\u5206\u652f\u662f\u4ec0\u4e48\u540d\u5b57\u7ebf\u4e0a\u5c31\u662f\u4ec0\u4e48\u540d\u5b57\ngit push origin [\u9700\u8981\u63a8\u9001\u4ee3\u7801\u7684\u5206\u652f]\n\n# \u5206\u652f\u5408\u5e76\n\n# \u7b2c\u4e00\u6b65 \u5728\u81ea\u5df1\u7684\u5f00\u53d1\u5206\u652f\ngit add .\ngit commit -m '\u63d0\u4ea4\u5185\u5bb9'\ngit push\n# \u7b2c\u4e8c\u6b65 \u4e3b\u5206\u652f(\u9700\u8981\u5408\u5e76\u7684\u5206\u652f)\ngit checkout [\u76ee\u6807\u5206\u652f]\n#\u62c9\u53d6\u6700\u65b0\u7684\u4ee3\u7801\ngit pull\n# \u628a\u81ea\u5df1\u7684\u5f00\u53d1\u5206\u652f\u5408\u5230\u6d3b\u52a8\u5206\u652f\ngit merge [\u81ea\u5df1\u7684\u5f00\u53d1\u5206\u652f]",lang:"bash"}),c.a.createElement("h2",{id:"git-\u64a4\u9500-pull-\u6216\u8005-commit-\u64cd\u4f5c"},c.a.createElement(i["AnchorLink"],{to:"#git-\u64a4\u9500-pull-\u6216\u8005-commit-\u64cd\u4f5c","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"git \u64a4\u9500 pull \u6216\u8005 commit \u64cd\u4f5c"),c.a.createElement(r["a"],{code:"# \u53ef\u4ee5\u663e\u793a\u5f53\u524d\u5206\u652f\u6240\u6709\u63d0\u4ea4\u8fc7\u7684\u7248\u672c\u4fe1\u606f\uff0c\u4e0d\u5305\u62ec\u5df2\u7ecf\u88ab\u5220\u9664\u7684 commit \u8bb0\u5f55\u548creset\u7684\u64cd\u4f5c\ngit log\n\n# git reflog\u547d\u4ee4\u4e2d\u4fdd\u7559\u4e86\u4ececlone\u4ed3\u5e93\u5f00\u59cb\uff0c\u7528\u6237\u6240\u6709\u5728\u672c\u5730\u5e93\u4e2d\u7684\u64cd\u4f5c\uff0c\u6240\u6709\u5f15\u8d77HEAD\u6307\u9488\u53d8\u52a8\u7684\u64cd\u4f5c\uff0c\u90fd\u4f1a\u88ab\u8bb0\u5f55\u5728git reflog\u547d\u4ee4\u4e2d\ngit reflog\n\n# \u4e00\u884c\u663e\u793a \u7b80\u4ecb\u7684\u770b\ngit log --pretty=oneline\n\n#\u64a4\u9500\u64cd\u4f5c\ngit reset --hard \u5bf9\u5e94\u524d\u9762\u7684\u6570\u5b57\n\n# \u4e24\u8005\u7684\u533a\u522b\u5c31\u662f\uff1areflog\u53ef\u4ee5\u4e70\u540e\u6094\u836f\uff0clog\u4e0d\u80fd\u4e70\u540e\u6094\u836f",lang:"bash"}),c.a.createElement("h2",{id:"git-\u4fee\u6539\u5206\u652f\u540d\u79f0"},c.a.createElement(i["AnchorLink"],{to:"#git-\u4fee\u6539\u5206\u652f\u540d\u79f0","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"git \u4fee\u6539\u5206\u652f\u540d\u79f0"),c.a.createElement(r["a"],{code:"# 1\u3001\u672c\u5730\u5206\u652f\u91cd\u547d\u540d(\u8fd8\u6ca1\u6709\u63a8\u9001\u5230\u8fdc\u7a0b)\ngit branch -m oldName newName\n# 2\u3001\u91cd\u547d\u540d\u8fdc\u7a0b\u5206\u652f\u5bf9\u5e94\u7684\u672c\u5730\u5206\u652f\ngit branch -m oldName newName\n# 3\u3001\u5220\u9664\u8fdc\u7a0b\u5206\u652f\ngit push --delete origin oldName\n# 4\u3001\u4e0a\u4f20\u65b0\u547d\u540d\u7684\u672c\u5730\u5206\u652f\ngit push origin newName\n# 5\u3001\u628a\u4fee\u6539\u540e\u7684\u672c\u5730\u5206\u652f\u4e0e\u8fdc\u7a0b\u5206\u652f\u5173\u8054\ngit branch --set-upstream-to origin/newName",lang:"bash"}),c.a.createElement("h2",{id:"nrm-\u5207\u6362\u6e90"},c.a.createElement(i["AnchorLink"],{to:"#nrm-\u5207\u6362\u6e90","aria-hidden":"true",tabIndex:-1},c.a.createElement("span",{className:"icon icon-link"})),"nrm \u5207\u6362\u6e90"),c.a.createElement(r["a"],{code:"# 1. \u4e0b\u8f7d nrm\nnpm install -g nrm\n# 2. \u6dfb\u52a0\u6e90\nnrm add \u540d\u5b57 \u79c1\u6709npm\u5730\u5740\n# 3\u3001\u4f7f\u7528\u67d0\u4e2a\u6e90\u5730\u5740\nnrm use \u540d\u5b57\n# 4. \u67e5\u770b nrm \u5730\u5740\u5217\u8868\nnrm ls\n# 5. \u5220\u9664\u6e90\u5730\u5740\nnrm del \u540d\u5b57",lang:"bash"})))}));n["default"]=e=>{var n=c.a.useContext(i["context"]),a=n.demos;return c.a.useEffect((()=>{var n;null!==e&&void 0!==e&&null!==(n=e.location)&&void 0!==n&&n.hash&&i["AnchorLink"].scrollToAnchor(decodeURIComponent(e.location.hash.slice(1)))}),[]),c.a.createElement(l,{demos:a})}}}]);