我试图设置一个Grunt来提交Github上的存储库。
在Gruntjs,我有;
buildcontrol: {
options: {
dir: 'dist',
commit: true,
push: true,
message: 'Built %sourceName% from commit %sourceCommit% on branch %sourceBranch%'
},
pages: {
options: {
remote: 'git@github.com:numediaweb/test.git',
branch: 'gh-pages'
}
},
local: {
options: {
remote: '../',
branch: 'build'
}
}
},
但是当我执行命令grunt buildcontrol:pages
时,我收到了这个警告;
Running "buildcontrol:pages" (buildcontrol) task
Warning: There are uncommitted changes in your working directory.
Please commit changes to the main project before you commit to
the built code.
我关注了this tutorial和this one,但无法让它发挥作用..我错过了什么吗?
答案 0 :(得分:0)
答案 1 :(得分:0)
查看connectCommits
媒体资源:https://github.com/robwierzbowski/grunt-build-control#connectcommits
我添加了这个,以防止构建和推送无法追溯到父项目提交的代码。如果你在项目开始时做了大量的黑客操作,你可以将其设置为假,但是一旦你开始运行,我认为留下它是一个好主意。