如何使用 npm 脚本使用自定义提交消息推送到 github?
How to push to github with custom commit message with npm scripts?
在我的 package.json
我有这个
"scripts": {
"start": "gulp serve",
"git": "git add . && git commit -m 'some-message' && git push --all"
},
在终端 I 运行 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
在我的 package.json
我有这个
"scripts": {
"start": "gulp serve",
"git": "git add . && git commit -m 'some-message' && git push --all"
},
在终端 I 运行 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