gpt4 book ai didi

node.js - 如何使用 npm 脚本将自定义提交消息推送到 github?

转载 作者:搜寻专家 更新时间:2023-10-31 22:38:08 25 4
gpt4 key购买 nike

在我的 package.json 我有这个

  "scripts": {
"start": "gulp serve",
"git": "git add . && git commit -m 'some-message' && git push --all"
},

在终端中,我运行 npm run git 并推送更改。但是我怎样才能即时更改提交消息呢?例如 npm run git MESSAGE='another commit'

最佳答案

涉及一些 npm 欺骗的解决方案可能包括:

"scripts": {
"git": "git add . && git commit -m",
"postgit": "git push --all"
},

被称为:

npm run git -- "Message of the commit"

或:

npm run git -- Message

关于node.js - 如何使用 npm 脚本将自定义提交消息推送到 github?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44459774/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com