Skip to content

Instantly share code, notes, and snippets.

@johnbeynon
Last active April 9, 2016 07:57
Show Gist options
  • Save johnbeynon/f1f4f7aedb9361114cf8ad567a59f9fc to your computer and use it in GitHub Desktop.
Save johnbeynon/f1f4f7aedb9361114cf8ad567a59f9fc to your computer and use it in GitHub Desktop.

After deploying an Heroku Button app the apps git repo is not updated. Attempts to clone it will result in a message "You have cloned an empty repo". You can easily link an Heroku Button app to a repo so you can make changes to the source and deploy it again.

  • Deploy the app with Heroku Button and remember the app name that you created.
  • Go back to where the Heroku Button was displayed and copy it's underlying URL eg https://heroku.com/deploy?template=https://github.com/jamesward/heroku-connect-phone-change
  • Now extract the https://github.com part so you're left with https://github.com/jamesward/heroku-connect-phone-change
  • Clone the repo with heroku git:clone -a <YOUR-APP-NAME> - it will be reported as empty
  • cd into the project and add a git remote pointing at the original source, git remote add origin https://github.com/jamesward/heroku-connect-phone-change
  • pull from the remote origin git pull origin master
  • ls the directory, and there's the code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment