2

I have one gitlab / github remote repo for reviewing the code and I want to use Heroku as a second git remote url to deploy my app.

It works fine when I git remote add name url and then git push name branch

However: When I want to clone the repository on another computer from gitlab, all the remote urls are gone, just only the gitlab url is left.

How can I send save all the remote URLs ?

Thanks.

André
  • 1,078
  • 10
  • 22

1 Answers1

2

Git remotes are part of the local repository's configuration, not part of the repository itself -- they are not included in a clone.

You could do this by writing and checking-in a script that, when run, sets up the desired remotes in your local repository, and then just remember to run it after cloning.

Jonathan
  • 13,354
  • 4
  • 36
  • 32