Cli Tools

Feb 21st, 2020 - Now

git

如何迁移当前更改到新的分支

Ref: git 将当前分支上修改的东西转移到新建分支 优雅的解决方案:压栈更改再弹出更改

  1. 在修改的分支上 git stash 可以将当前更改的结果压栈到临时保存区内

  2. 新建分支 git checkout -b new_branch

  3. 将当前的临时保存弹出 git stash pop

git clone 慢

通过代理可以加快速度: 临时:

git clone -c http.proxy="http://127.0.0.1:1080" repourl

永久:

git config --global http.proxy "http://127.0.0.1:1080"

效果对比:

Before: 4.00 KiB/s
After:  1.82 MiB/s

npm

nrm

Description: source controller for npm

Install:

(sudo) npm install -g nrm Admin rigths required.

Usage:

  1. nrm ls : check all sources

  2. nrm add [name] https://address : add new source

  3. nrm del [name] : delete a source

  4. nrm use [name] : switch to a source

  5. nrm test : test the speed of all sources

vue

ag

Ubuntu

保存并运行

yum

macOs

grep

linux grep 查看指定内容上下几行

Last updated

Was this helpful?