【发布时间】:2019-11-29 22:33:20
【问题描述】:
Heroku 不会重新加载我更正后的 Procfile
我运行了 git status,它显示了 Procfile,我意识到我用小写 p 拼写了 Procfile。我看到了错误并更新了项目中的文件名,但是当我再次保存并运行 git status 时,它仍然显示为小写。当然,现在它不会在 Heroku 上显示该网站。
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: procfile
remote: -----> Discovering process types
remote:
remote: ~ Mis-cased procfile detected; ignoring.
remote: ~ Rename it to Procfile to have it honored.
remote:
remote: Procfile declares types -> (none)
我第一个项目的新手。我应该删除 Heroku 上的项目并重新开始,还是可以只执行 git init 然后将所有内容再次推送到 Heroku?
【问题讨论】:
-
“没有为提交暂存的更改”——所以暂存该更改并提交它。如果您想发布对 Heroku 的更改,您需要先提交它们。
-
我已更正并保存了所有更改两次并尝试提交,但它没有获取对配置文件的更改。 Git 仍然看到“procfile”而不是“Procfile”。我认为删除 Heroku 中的项目并再次运行 git init 会更容易,这样它就可以正确设置所有内容,然后再次运行 heroku create。
-
您使用的是什么操作系统?
-
我使用的是 Windows 10。我尝试重新初始化并再次提交,但它仍然在尝试重新提交错误的 procfile。不知道下一步该做什么。
-
默认情况下,Windows 的文件系统不区分大小写。
Procfile和procfile在那里是一样的,所以你不能直接将一个重命名为另一个。见stackoverflow.com/a/1793755/354577