Am using Aptana Studio 3 and Heroku for a RoR website project. When I push my site to Heroku after a 'commit' via GitHub I keep getting this error. Have searched everywhere but can't find a simple solution that I can follow. Any advice what has happened and how to reslove? Thx.
User$ git push heroku master
To [email protected]:xxxxxx.git
! [rejected] master -> master (non-fast forward)
error: failed to push some refs to '[email protected]:xxxxxx.git'
To prevent you from losing history, non-fast-forward updates were rejected.
Merge the remote changes before pushing again.
See 'non-fast forward' section of 'git push --help' for details.
User$
I tried this suggestion as per below from @SkillDrick and got this plus the error at the end:
User$ git merge heroku/master master
usage: git merge [options] <remote>...
or: git merge [options] <msg> HEAD <remote>
-n do not show a diffstat at the end of the merge
--stat show a diffstat at the end of the merge
--summary (synonym to --stat)
--log add list of one-line log to merge commit message
--squash create a single commit instead of doing a merge
--commit perform a commit if the merge succeeds (default)
--ff allow fast forward (default)
-s, --strategy <strategy>
merge strategy to use
-m, --message <message>
message to be used for the merge commit (if any)
-v, --verbose be more verbose
-q, --quiet be more quiet
user$ git push heroku master
To [email protected]:worrybin.git
! [rejected] master -> master (non-fast forward)
error: failed to push some refs to '[email protected]:worrybin.git'
To prevent you from losing history, non-fast-forward updates were rejected.
Merge the remote changes before pushing again.
See 'non-fast forward' section of 'git push --help' for details.
I had the same issue. A very simple solution would be to force the push anyways:
git push heroku master -f
Since heroku is just being used to deploy your App(and not for source control like origin/master) this should be fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With