How to read a single file in Heroku via bash

I am trying to read a file in Heroku because the old website where Git is damaged and I no longer have files for it. I went back to my version to read it, and I ended up in the bash folder where it uses

heroku run bash ls app/views/ 

How can I read my file here?

+6
source share
2 answers

The easiest way is to clone the repo from Heroku and locally receive files from Git.

 git clone git@heroku.com :<your app>.git git co <revision> 

Then you can access your files.

+4
source

When you use bash, you can just write the file

heroku run bash -a my-app

and then:

ls app/views/ cat my_super_file

+25
source

All Articles