0

Is it possible to add heroku git repository to github?

Example I have a Heroku git:

git@heroku.com:myapp.git

Can I somehow add this to github? So I can see want files are on the server and follow changes etc..

Rails beginner
  • 14,321
  • 35
  • 137
  • 257

2 Answers2

1

You can just add another remote to your clone that points to your github account/repository and then push to that repository as well when you make changes. You'll have to make sure though, that you always push to both remotes.

Sebastian Blask
  • 2,870
  • 1
  • 16
  • 29
  • So I always need to do 2 push commands? Is there not a better way to do this? – Rails beginner Jan 22 '13 at 13:32
  • I do 2 pushes with my project on openshift/bitbucket and I like that I can know my data safe without having to update the code on openshift. There are ways to do one push only though: http://stackoverflow.com/questions/5785549/able-to-push-to-all-git-remotes-with-the-one-command – Sebastian Blask Jan 22 '13 at 13:36
0

It is possible to set up git to push to two repositories simultaneously.

Please see this post here: Pushing to Multiple Git Repositories Simultaneously

webjames
  • 1,087
  • 8
  • 12