在我的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'
答案 0 :(得分:10)
涉及一些npm技巧的解决方案可能包括:
--max_allowed_packet
被称为:
"scripts": {
"git": "git add . && git commit -m",
"postgit": "git push --all"
},
或:
npm run git -- "Message of the commit"