惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
量子位
M
MIT News - Artificial intelligence
Y
Y Combinator Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Google DeepMind News
Google DeepMind News
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
雷峰网
雷峰网
I
InfoQ
罗磊的独立博客
博客园 - 聂微东
酷 壳 – CoolShell
酷 壳 – CoolShell
大猫的无限游戏
大猫的无限游戏
D
Docker
H
Hackread – Cybersecurity News, Data Breaches, AI and More
腾讯CDC
博客园 - 三生石上(FineUI控件)
The GitHub Blog
The GitHub Blog
K
Kaspersky official blog
P
Privacy & Cybersecurity Law Blog
S
SegmentFault 最新的问题
T
Threat Research - Cisco Blogs
H
Help Net Security
小众软件
小众软件
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
CERT Recently Published Vulnerability Notes
WordPress大学
WordPress大学
T
Tenable Blog
T
The Blog of Author Tim Ferriss
C
Cisco Blogs
Simon Willison's Weblog
Simon Willison's Weblog
博客园 - Franky
A
Arctic Wolf
T
Threatpost
Scott Helme
Scott Helme
C
Cybersecurity and Infrastructure Security Agency CISA
D
Darknet – Hacking Tools, Hacker News & Cyber Security
T
The Exploit Database - CXSecurity.com
G
GRAHAM CLULEY
Security Latest
Security Latest
Spread Privacy
Spread Privacy
L
LINUX DO - 热门话题
V
Vulnerabilities – Threatpost
P
Privacy International News Feed
S
Schneier on Security
Latest news
Latest news
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Cyber Attacks, Cyber Crime and Cyber Security
C
CXSECURITY Database RSS Feed - CXSecurity.com

博客园 - 一丝心情

Volta 安装和使用指南 免费国产ai试用总结 glb格式3d模型压缩 nuxt.js 项目流水线自动部署设置 免费的云数据库 vue 实用指令 IntelliJ IDEA license server 激活(亲测有效) win10/win11专业版激活码(亲测有效) Git 常用指令完全指南 npm 安装依赖报错整理 css3文字渐变, svg文字渐变 http/https与websocket的ws/wss的关系 指令 v-tooltip vue 自定义指令实现v-overflow-tooltip element-ui NavMenu 多级嵌套封装 常用css vue.config.js config.resolve.alias 目录别名配置 three.js 在低版本浏览报THREE.WebGLProgran: shader error 报错解决办法 nuxt 低版本浏览器兼容babel编译配置 常用软件历史版本下载 数组常用方法总结 vue 中 echarts 添加事件 常用正则
前端常用指令
一丝心情 · 2022-10-08 · via 博客园 - 一丝心情

一、git

  1. 代码提交
    git pull                                 //从仓库拉取最新代码
    git status                               //获取本地文件添加前状态        
    git add *                                //添加
    git status                               //获取本地文件添加后状态
    git commit -m "xxx"                      //提交注释
    git push -u origin master                //推送到主仓库
    
    git push -f origin master                //强行推送到主仓库
  2. 分支操作
    git clone -b 分支名称 项目地址                       //克隆指定分支
    git branch -v                                     //查看所有分支
    git remote -v                                     //查看远程分支信息
    git checkout –b 分支名称 origin/分支名称          //可以拉取远程分支并创建本地分支,同时自动切换到该本地分支
    git branch 本地开发分支名                           //创建本地开发分支     
    git checkout 本地开发分支名                        //切换到本地开发分支
    git push -u origin 分支名称                        //提交代码到指定分支
  3. 合并代码
    //将主分支合并到分分支
    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 的消息内容填错了)

二、删除node_modules文件夹

  1. windows 下使用rmdir 指令删除
  2. 使用rimraf 插件删除
    2.1.全局安装rimraf  指令

    2.2.使用rimraf 命令删除

  3. Linux下使用rm命令删除

三、node版本控制管理工具nvm常用命令(使用管理员身份打开cdm)[→nvm在window系统安装] 【nvm安装】【安装nvm后,nvm不是内部命令,node也不能用了 - 紫花地丁year - 博客园 (cnblogs.com)

  1. 查看已经安装的所有nodejs版本  nvm ls  
    C:\WINDOWS\system32>nvm ls
        14.18.1
  2. 可安装指定版本的nodejs  nvm install 版本号 
    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
  3. 切换到指定版本 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
  4. 卸载指定版本 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

四、nginx常用命令

  1. 启动(先cd到服务跟路径下)
  2. 重启
  3. 停止
  4. 退出
 rewrite ^/api/(.*) /$1 break;

五、windows DOS 命令

  1. 进入磁盘(进入d盘) d: 
  2. 切换目录【cd 目录名】 cd 文件夹名称 
  3. 放回上一级目录 cd.. 
  4. 在当前目录下创建文件夹  md 文件夹名称  或  mkdir 文件夹名称  
  5. 创建文本并编辑(ctrl+z 回车结束编写;echo只能单行输入编写,echo con可以多行输入编写文本) echo 文本内容 > 文本名称 
    D:\>echo 这是一句话 > mytext
    D:\>
  6. 重命名文件名 ren 原名称 新名称 
  7. 移动文件 move 移动文件名 移动到的位置  
    D:\>move text demo
    移动了         1 个文件。
    D:\>
  8. 显示当前目录中文件和子目录 dir 
    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>
  9. 显示文本文件的内容 type 文件名  ,分页显示 type 文件名 |more 
    D:\demo>type text
    这是一句话
    D:\demo>
  10. 删除文件  del *.txt  (删除目录下所有.txt文件)    del *.* (删除目录下所有文件)   加 /s/q (不要提示)
    D:\demo>del *.*
    D:\demo\*.*, 是否确认(Y/N)? Y
    D:\demo>
  11. 删除文件夹  rd 文件夹名称  或 mdir 文件夹名称  加 /s/q (不要提示)
    D:\demo>cd..
    D:\>rd demo
    D:\>