我克隆了我的存储库:
git clone ssh://xxxxx/xx.git
Run Code Online (Sandbox Code Playgroud)
但之后,我改变了一些文件,并add与commit他们,我想他们推到服务器:
git add xxx.php
git commit -m "TEST"
git push origin master
Run Code Online (Sandbox Code Playgroud)
但我得到的错误是:
error: src refspec master does not match any.
error: failed to push some refs to 'ssh://xxxxx.com/project.git'
Run Code Online (Sandbox Code Playgroud) 我是heroku和gunicorn的新手,所以我不确定这是如何工作的.但我已经做了一些搜索,我认为我已接近部署我的Django应用程序(1.5.1).所以我知道我需要一个具有的Procfile
web: gunicorn app.wsgi
Run Code Online (Sandbox Code Playgroud)
因为我的目录有点不同.我无法在根目录中运行gunicorn
app_project
requirements/
contributors/
app/
app/
settings/
wsgi.py
# Normally Procfile goes here
Procfile
Run Code Online (Sandbox Code Playgroud)
通常app /将是根目录,但我决定以这种方式构建我的文件夹以将我的django应用程序与其他一些东西分开.由于我必须将Procfile放在根目录中以便heroku识别它,我应该在Procfile中放入什么和/或我应该在gunicorn命令中放置什么参数?
注意:
web: gunicorn app.wsgi # won't work because Procfile is in a directory above
# I also want to keep the directories as is
# I also don't want to create a secondary git inside the app folder just for heroku
web: gunicorn app.app.wsgi # won't work because I don't want to convert the folder into a python module
Run Code Online (Sandbox Code Playgroud) 当我跑步时git push heroku master,我得到的是:
C:\Users\Emanuele-PC\Desktop\project-mm-beta>git push heroku master
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 505 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> App not compatible with buildpack: https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/python.tgz
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to project-mm-beta. …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) 我已经看到这个问题未能将一些引用推送到 git@heroku.com并且我是以下私有存储库的唯一开发人员,该存储库只有一个主分支
从我的搜索中我看到,当您的本地存储库与远程存储库不是最新的时,通常会发生此错误,但我不知道为什么会收到此错误?
我目前正在尝试将我的不和谐机器人连接到 Heroku 并 24/7 托管它,但我遇到了问题。
我将我的机器人上传到 github https://github.com/zemocode/flankebot/tree/master
我已经创建了我需要的两个主要文件
我在 Heroku 上单击了部署分支,但出现此错误。
! No default language could be detected for this app.
HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.
See https://devcenter.heroku.com/articles/buildpacks
! Push failed
Run Code Online (Sandbox Code Playgroud)
我遵循了教程,但其他人都有 node.js,所以我的不起作用。
当我尝试将我的文件推送到heroku rep时,我收到此错误.我试过以下解决方案,但没有帮助:
git pull heroku master(结果如下)git push heroku -f(结果如下)请指导我完成这个.
谢谢
C:\myapp>git init
Reinitialized existing Git repository in C:/myapp/.git/
C:\myapp>git add .
C:\myapp>git add -u
C:\myapp>git commit -m "ic"
# On branch master
nothing to commit (working directory clean)
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 …Run Code Online (Sandbox Code Playgroud)