failed to push some refs to git@heroku.com

后端 未结 27 2185
野性不改
野性不改 2020-12-02 10:10

I am getting this error when I am trying push my files into heroku rep.

Ive set autocrlf = false already in gitconfig but this problem is still there. i have also tr

相关标签:
27条回答
  • 2020-12-02 10:12

    this problem arises when you have some file that is not yet added and committed to git.

    git add .
    git commit -m "commit done"
    git push heroku master
    
    0 讨论(0)
  • 2020-12-02 10:13

    I had the same problem, the solution was

    in my branch, called "testBranchSuper"

    i use

    git checkout -b main

    and then i use

    git push heroku main

    0 讨论(0)
  • 2020-12-02 10:13

    It is probably due to an Outdated yarn.lock file

    Just run the following commands

    yarn install
    git add yarn.lock
    git commit -m "Updated Yarn lockfile"
    git push heroku master
    
    0 讨论(0)
  • 2020-12-02 10:14

    If you want to push commit on git repository, plz make sure you have merged all commit from other branches.

    After merging if you are unable to push commit, Use the push command with -f

    git push -f origin branch-name

    Where origin is the name of your remote repo.

    0 讨论(0)
  • 2020-12-02 10:15

    This error means that the upstream repository has made commits that would be lost if you were to push. First do a "git pull" to merge, and then push again.

    0 讨论(0)
  • 2020-12-02 10:17

    Another issue could come from the use of backticks, those are not supported by the compiler (uglifier).

    To fix it, replace config.assets.js_compressor = :uglifier with config.assets.js_compressor = Uglifier.new(harmony: true).

    credits: https://medium.com/@leog7one/how-to-fix-execjs-runtimeerror-syntaxerror-unexpected-character-on-heroku-push-deployment-c0b105a64655

    0 讨论(0)
提交回复
热议问题