我有几个将git推送到heroku的unix命令,但是有一个问题,我遇到了麻烦。我有凉亭组件,.gitignore
因为它们不应该出现在仓库中。因此,在自动化步骤中,它将创建一个新分支,删除.gitignore
并添加Herer推送的Bower文件。不幸的是,在该过程结束时,我没有Bower目录。如何保存我的凉亭目录?
gulp.task 'deploy', shell.task [
'git checkout master'
'git branch -D dist'
'git stash'
'git checkout -b dist'
'rm .gitignore'
'git add .gitignore --all'
'gulp build',
'git add public'
'git commit -m "build for release"'
'git push heroku dist:master --force'
'git checkout master'
'git branch -D dist'
'git stash pop'
'echo "Deployed."'
'heroku open'
], ignoreErrors: true
public/components/bower
检出master后,可以在删除dist
分支之前执行以下操作:
git checkout dist -- public/components/bower
git reset
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句