git pull origin develop
Git status
Git add
Git commit -m ‘’
Git push
修改本地分支名称:
git branch -m oldBranchName newBranchName
rm -i fileName. 删除文件
mv fileoldName fileNewName. 修改文件名
unzip fileName 解压文件
更新最新的包:@latest
创建目录:mkdir fileName
创建文件:touch fileName
yarn 清除缓存:yarn cache clean
incorrect integrity when fetching from the cache
git reset --soft HEAD~ 撤销上一次commit
sudo npm install Mac下载依赖
git checkout -b xxx 创建本地分支并切换到该分支
git push origin xxx 提交xxx分支
git merge origin/xxx 合并xxx分支代码
git branch -d xxx 删除本地分支
git branch -a 查看分支
git fetch -p // 小写p,更新远程分支
git remote update origin — prune 更新远程分支
git remote update origin -p 更新远程分支
git fetch origin -prune 更新远程分支
Node版本过高问题:
export NODE_OPTIONS=–openssl-legacy-provider
npm ERR! code ERESOLVE 解决方法/npm 版本问题
npm install --legacy-peer-deps
Mac配置环境变量起项目:
export NODE_ENV=sit&&npm start
github项目clone不下来:
1.翻墙
2.配置代理:git config --global http.https://github.com.proxy socks5://127.0.0.1:7890
下载完记得删除代理:git config --global --unset http.https://github.com.proxy
查看全部git config: git config --global -l
不处理拉下来代码问题直接合并(忽略eslint校验):git commit --no-verify -m’xxxxxxxxxxxxxx’
强推代码:git push -f -u origin 分支名
回退一次暂存的提交: git reset head^
字体包裁切。 Npm包。 font-spider
- feat - 新功能 feature
- fix - 修复 bug
- docs - 文档注释
- style - 代码格式(不影响代码运行的变动)
- refactor - 重构、优化(既不增加新功能,也不是修复bug)
- perf - 性能优化
- test - 增加测试
- chore - 构建过程或辅助工具的变动
- revert - 回退
- build - 打包
忽略版本冲突直接安装:npm install --legacy-peer-deps
发布npm流程的命令
前提:注册npm用户
流程:
提交完代码之后
npm run build 先构建代码
npm config set registry http://npm.xxxx 切换到私有库
npm login 登录npm账号
npm publish 发布到npm
npm config set registry https://registry.yarnpkg.com/
之后就可以让别人下载依赖了,
注意提醒退出重新登录和清缓存,查看依赖的版本等
nrm —version
切换node版本
npm install --local n
n -V
sudo n 18.0.0
n list
node -v