当我尝试将我的文件推送到heroku rep时,我收到此错误.
我已经在gitconfig中设置了autocrlf = false但是这个问题仍然存在.我也试过这个解决方案, 但没有收获.
任何建议都可能是git仍然使用旧配置设置,如果是,那么我该如何刷新它.
谢谢
C:\myapp>git push heroku
To git@heroku.com:myapp.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@heroku.com: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.
Run Code Online (Sandbox Code Playgroud)
在尝试时 git pull heroku master
warning: no common commits
remote: Counting objects: 215, done.
remote: Compressing objects: 100% (147/147), done. …Run Code Online (Sandbox Code Playgroud) 我有一个远程git存储库和我使用的本地存储库.每当我在本地进行任何更改时,我都会将它们推送到遥控器.然后我有时在远程控制器上执行"git commit"来存储远程文件的更改.
我根本不直接编辑远程存储库.我只是提交了更改.我是一个单一的开发者,没有其他人在该回购上工作.
为什么我会得到一个错误,据我所知,这意味着我必须先拉?
我不想拉,因为远程存储库文件已过时,它将丢失我的本地更改.这真的很烦人,为什么会这样呢?如何在不必拉动或重新创建存储库的情况下修复?(正如你所看到的,这有点像版本控制风格的颠覆类型)
编辑 - 错误:
To ssh://...
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'ssh://...'
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.
Run Code Online (Sandbox Code Playgroud) 我已经陷入了与heroku的混乱.我正在部署一个Wordpress PHP应用程序,基本上在主题目录中有一大堆git repos,加上我从github项目中克隆的父主题.我成功部署了Wordpress,但是git忽略了已经在他们单独的repos中跟踪的主题,所以我回去并将主题复制到不同的目录,以便不会跟踪它们,并删除.git文件夹.
我的问题是,执行此操作后,Heroku不会让我这样做git push heroku master,但会回复此错误消息:
Writing objects: 100% (972/972), 2.73 MiB | 76 KiB/s, done.
Total 972 (delta 46), reused 0 (delta 0)
! Heroku push rejected due to an unrecognized error.
! We've been notified, see http://support.heroku.com if the problem persists.
To git@heroku.com:....git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:....git'
Run Code Online (Sandbox Code Playgroud)
我试过了git pull heroku master,这让我"已经是最新的了".我也尝试添加-f标志,但这也不起作用.有时拒绝Heroku中的应用程序.
有任何想法吗?
编辑:
我也尝试过这里的建议:未能将一些参考文献推送到git@heroku.com:myapp.git
包括从heroku/master创建一个新分支,然后立即将它推送到heroku.它失败.