
















git pull //从仓库拉取最新代码 git status //获取本地文件添加前状态 git add * //添加 git status //获取本地文件添加后状态 git commit -m "xxx" //提交注释 git push -u origin master //推送到主仓库 git push -f origin master //强行推送到主仓库
git clone -b 分支名称 项目地址 //克隆指定分支 git branch -v //查看所有分支 git remote -v //查看远程分支信息 git checkout –b 分支名称 origin/分支名称 //可以拉取远程分支并创建本地分支,同时自动切换到该本地分支 git branch 本地开发分支名 //创建本地开发分支 git checkout 本地开发分支名 //切换到本地开发分支 git push -u origin 分支名称 //提交代码到指定分支
//将主分支合并到分分支 git fetch origin git checkout -b 分分支 git merge origin/主分支 git status git add * git commit -m '同步最新主分支代码' git push -u origin 分分支名称 //将分分支合并到主分支 git fetch origin git checkout -b 主分支 git merge origin/分分支 git status git add * git commit -m '同步最新分分支代码' git push -u origin 主分支
4.软撤销 --soft (本地代码不会变化,只是 git 转改会恢复为 commit 之前的状态,不删除工作空间改动代码,撤销 commit,不撤销 git add)
5.硬撤销(本地代码会直接变更为指定的提交版本,慎用删除工作空间改动代码,撤销 commit,撤销 git add .)
6.撤销(不删除工作空间改动代码,撤销commit,并且撤销git add )
7.修改撤销commit内容(仅仅commit 的消息内容填错了)
2.2.使用rimraf 命令删除
Linux下使用rm命令删除
三、node版本控制管理工具nvm常用命令(使用管理员身份打开cdm)[→nvm在window系统安装] 【nvm安装】【安装nvm后,nvm不是内部命令,node也不能用了 - 紫花地丁year - 博客园 (cnblogs.com)】
C:\WINDOWS\system32>nvm ls 14.18.1
C:\WINDOWS\system32>nvm install 11.15.0 Downloading node.js version 11.15.0 (64-bit)... Complete Creating D:\Software\work\nvm\temp Downloading npm version 6.7.0... Complete Installing npm v6.7.0... Installation complete. If you want to use this version, type nvm use 11.15.0
切换到指定版本 nvm use 版本号 , 切换成功后可使用 node -v 查看
C:\WINDOWS\system32>nvm use 11.15.0 Now using node v11.15.0 (64-bit) C:\WINDOWS\system32>nvm ls 14.18.1 * 11.15.0 (Currently using 64-bit executable) C:\WINDOWS\system32>node -v v11.15.0
卸载指定版本 nvm uninstall 版本号 ,卸载完成后可使用 nvm ls查看
C:\WINDOWS\system32>nvm uninstall 11.15.0 Uninstalling node v11.15.0... done C:\WINDOWS\system32>nvm ls 14.18.1
rewrite ^/api/(.*) /$1 break;
D:\>echo 这是一句话 > mytext
D:\>
D:\>move text demo 移动了 1 个文件。 D:\>
D:\>cd demo D:\demo>dir 驱动器 D 中的卷没有标签。 卷的序列号是 52E1-CC15 D:\demo 的目录 2022-09-22 14:46 <DIR> . 2022-09-22 14:46 <DIR> .. 2022-09-22 14:39 13 text 1 个文件 13 字节 2 个目录 143,041,232,896 可用字节
D:\demo>
D:\demo>type text
这是一句话
D:\demo>
D:\demo>del *.*
D:\demo\*.*, 是否确认(Y/N)? Y
D:\demo>
D:\demo>cd.. D:\>rd demo D:\>
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。