美文网首页
windows中使用shell

windows中使用shell

作者: Wrestle_Mania | 来源:发表于2019-12-30 17:19 被阅读0次

https://blog.csdn.net/nianbingsihan/article/details/80236348

解决乱码的问题

  • 查看当前编码
chcp

默认显示的是936:GBK(一般情况下为默认编码)

  • 设置编码
chcp 65001

这样就设置成了UTF-8的编码形式


项目中使用

  • 在项目根目录新建一个.bat结尾的文件(build.bat)
@echo off

call npm run buildDev

git add .
set/p co=  请输入测试环境的描述内容:
git commit -m "%co%"
git push

echo 测试环境推送完成

git checkout master
git merge dev

call npm run buildPro

git add .
set/p co=  请输入正式环境的描述内容:
git commit -m "%co%"
git push

echo 测试环境推送完成

git checkout dev

echo 已切换到测试环境

注意这里要有一个call

相关文章

网友评论

      本文标题:windows中使用shell

      本文链接:https://www.haomeiwen.com/subject/cjvmoctx.html