问题描述
当我尝试将文件推送到 heroku 代表时出现此错误.
I am getting this error when I am trying push my files into heroku rep.
我已经在 gitconfig 中设置了 autocrlf = false 但这个问题仍然存在.我也试过这个解决方案这里但没有收获.
Ive set autocrlf = false already in gitconfig but this problem is still there.i have also tried this solution herebut no gain.
任何建议是否有可能是 git 仍在使用旧的配置设置,如果是,那么我该如何刷新它.
Any suggestion is this possible that git is still using old config setting if yes then how can I refresh it.
谢谢
C:myapp>git push heroku
To [email protected]:myapp.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to '[email protected]:myapp.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again. See the
'Note about fast-forwards' section of 'git push --help' for details.
同时尝试 git pull heroku master
warning: no common commits
remote: Counting objects: 215, done.
remote: Compressing objects: 100% (147/147), done.
remote: Total 215 (delta 82), reused 132 (delta 62)Receiving objects: 79% (170/
Receiving objects: 100% (215/215), 1.49 MiB | 107 KiB/s, done.
Resolving deltas: 100% (82/82), done.
From heroku.com:myapp
* branch master -> FETCH_HEAD
Auto-merging start.php
CONFLICT (add/add): Merge conflict in start.php
Auto-merging src/appinfo.txt
CONFLICT (add/add): Merge conflict in src/appinfo.txt
Auto-merging result.php
CONFLICT (add/add): Merge conflict in result.php
Auto-merging landhere.php
CONFLICT (add/add): Merge conflict in landhere.php
Automatic merge failed; fix conflicts and then commit the result.
同时尝试 git push heroku -f
F:myapp>git remote add heroku [email protected]:myapp.git
F:myapp>git push heroku
Counting objects: 41, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (40/40), done.
Writing objects: 100% (41/41), 1.36 MiB | 12 KiB/s, done.
Total 41 (delta 0), reused 0 (delta 0)
-----> Heroku receiving push
! Heroku push rejected, no Cedar-supported app detected
To [email protected]:myapp.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:myapp.git'
推荐答案
此错误意味着上游存储库进行了提交,如果您进行推送,这些提交将会丢失.先做一个git pull"合并,然后再push.
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.
这篇关于未能将一些引用推送到 [email protected]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!