[英]git push heroku master yields 'nothing changed' but doesnt recognize local changes?
我正在使用 heroku 在线上传的网站(django)上工作。 一切都很好,直到我不得不改变我的views.py。 现在当我这样做时:
- git add .
- git commit -m "smtg"
- git push heroku master
它告诉我没有任何改变,但我做了一些改变,似乎它看不到那些。 当我尝试 git init 它告诉我“
重新初始化 C:/Users/Loic/Documents/my_site2/.git/ 中的现有 Git 存储库
“你能帮我吗这是一个学校项目。谢谢
编辑:现在在 git 推 heroku 主人之后,我有:
To https://git.heroku.com/cleanpharmacycle.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://git.heroku.com/cleanpharmacycle.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
检查您当前的分支是主分支。
git branch
如果指针不指向主分支,则检查到主分支
git checkout master
git push heroku yourlocalbranch:master
如果你想将本地非 master 分支推送到 heroku master
提交您的更改并尝试推送到 heroku
git commit -am "xxxyyzzz"
git push heroku master
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.