0

I am currently learning Git and Heroku.

I'm at the point where I have created a Spring Boot project, initialized Git, and created an application on Heroku.

Now when I add all files, everything works. I commit the changes, no flaws, and lastly I set-up a remote to my .git.

This is where my error occurs. When I push my project onto my git, I get an error saying:

To https://git.heroku.com/heroku-boottest.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/heroku-boottest.git'

Keep in mind that my git is empty. I haven't pushed anything else onto the git.

Thanks in advance!

Ollejj
  • 11
  • 1

2 Answers2

1

I solved my issue!

For some reason heroku didn't want me to use JDK 14, so I changed my pom.xml to jdk 8

Ollejj
  • 11
  • 1
0

Based on the answer from here.

If the GitHub repo has seen new commits pushed to it, while you were working locally, I would advise using:

git pull --rebase
git push
Jalil.Jarjanazy
  • 633
  • 1
  • 3
  • 15
  • The problem is that my git repo was empty. Nothing has been comitted yet so there is nothing to pull. – Ollejj May 10 '20 at 10:02