Heroku clone creates an empty folder

后端 未结 1 1563
太阳男子
太阳男子 2021-02-08 07:24

So I am trying to learn heroku and yesterday from another computer I created an app. Today, from a different computer I am trying to clone the app (download the code) and keep w

1条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-08 08:04

    This is counterintuitive, but looks like it is by design at Heroku. You don't copy from Heroku git to local drive, but the other way around - from your PC to Heroku.

    You need to create or clone a repository on your local PC.

    git create OR

    git clone 
    

    then init your repository and commit code:

    $ cd myapp
    $ git init
    Initialized empty Git repository in .git/
    $ git add .
    $ git commit -m "my first commit"
    

    Then you need to link your repository with Heroku. Download their Toolbelt and run:

    heroku git:remote -a your_app_name_on_heroku
    

    And deploy code:

     git push heroku master
    

    Hope that helps. I had to open a ticket at Heroku to figure this out. Check Heroku Git instructions for further reference.

    0 讨论(0)
提交回复
热议问题