I am trying to use this tutorial https://medium.com/@sagarjauhari/quick-n-clean-way-to-deploy-vue-webpack-apps-on-heroku-b522d3904bc8 so that I only push the dist folder to heroku. I am using the following code:
"deploy": "git subtree push --prefix dist heroku master"
so when I am satisfied with my changes that i have made locally, i do the following.
npm run build
git add -A
git commit -m "message"
git push
npm run deploy
then i get an error message that reads:
! [rejected] a1869b5091eac1a50721d4c0cb8385f48338d8d9 -> master (non-fast-forward) error: failed to push some refs to 'https://git.heroku.com/foobar' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
What am I doing wrong? If I run git push heroku
at this point, it works fine.