Node 配置
环境配置
npm config set prefix "D:\envs\nodejs\node_global"
npm config set cache "D:\envs\nodejs\node_cache"
npm config set registry https://registry.npm.taobao.org
npm i -g yarn
yarn config set prefix "D:\envs\nodejs\yarn_global"
yarn config set global-folder "D:\envs\nodejs\yarn_global"
yarn config set cache-folder "D:\envs\nodejs\yarn_cache"
yarn config set registry https://registry.npm.taobao.org
更新 package.json
全局安装
npm-check-updates
npm i -g npm-check-updates
检查版本
ncu
执行命令
ncu -u to upgrade package.json
重新安装
npm install
更新指定包
yarn add [package_name]@latest
更新包里面全部
yarn upgrade / npm update
Python
设置镜像源
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
设置安装包目录
pip config set global.target D:\envs\python3\Scripts
清除pip缓存
pip cache purge
显示pip配置
pip show pip
Go
GOROOT D:\envs\go1.24.1
GOPATH D:\envs\.go
go env -w GOPROXY=https://mirrors.aliyun.com/goproxy/,direct
Git
提交取消 crlf 转 lf
自动转
git config --global core.autocrlf true
取消自动转
git config --global core.safecrlf false
取消托管
git rm -rf --cached
拉代码
克隆代码
git clone -b main http://192.168.0.200/product-group/.git
idea 初始化
git init
git add .
git commit -m "first"
git remote add origin xxxxx
git push -u origin "xxx"