7

Heroku will not reload my corrected Procfile

I have ran git status which shows me the Procfile and I realized that I spelled Procfile with a lower case p. I saw the error and updated the file name in my project but when I saved and ran git status again it stills shows it lower case. Of course now its not showing the site on 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)

Total newbie on my first project. Should I delete the project on Heroku and just start all over fresh or can I just do a git init and then just push everything up again to Heroku?

ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257
user3533000
  • 79
  • 1
  • 3
  • 3
    "Changes not staged for commit"—so stage that change and commit it. If you want to publish changes to Heroku you need to commit them first. – ChrisGPT was on strike Jul 22 '19 at 00:39
  • 1
    I have corrected and saved all of the changes twice and tried to commit but its not picking up the changes to the Profile. Git is still seeing "procfile" instead of "Procfile". I'm thinking it will just be easier to delete the project in Heroku and run git init again so it can set up everything correctly and then run heroku create again. – user3533000 Jul 23 '19 at 01:24
  • What operating system are you using? – ChrisGPT was on strike Jul 23 '19 at 02:14
  • I'm using Windows 10. I tried to re-init and commit again but its still it's still trying to recommit that bad procfile. Not sure what to do next. – user3533000 Jul 27 '19 at 16:15
  • 1
    By default, Windows' filesystem is case-insensitive. `Procfile` and `procfile` are the same thing there, so you can't directly rename one to the other. See https://stackoverflow.com/a/1793755/354577 – ChrisGPT was on strike Jul 27 '19 at 16:30
  • Thanks for working with me on this. After searching around for solutions I finally just ran: rm -rf .git and then git init. That removed the original git file which picked up the corrected Procfile when I initialized again. Heroku is seeing my project now. Thank You! – user3533000 Jul 29 '19 at 22:38

1 Answers1

12

This worked for me,

  • remove the Procfile from your working project directory
  • in your command line

git add -A to add your changes to git, git commit -m "Removed Procfile", git push heroku master

  • then, create the new Procfile with the right capitalization in your working project directory
  • then add, commit, and push your code to Heroku. Done!
Atm4God
  • 121
  • 1
  • 4