3

I'm working in a project that is being hosted in appharbor (like heroku for .net). It use git push to upload the code (my first time ever working with such environment).

The thing is that now I miss the features of a classic GIT or SVN repository, like seeing the code in a web site, tickets, etc.

My question is: Can I integrate for example assembla with appharbor in a way the let me send the code only once, and have it in both plataforms?

NicoGranelli
  • 670
  • 7
  • 14
  • We (AppHarbor) have an API for receiving source code from a third-party, so I'll ping Assembla and point them to the documentation. – Troels Thomsen Sep 24 '11 at 10:22

2 Answers2

0

Yes, you can add as many remotes as you like (github, assembla) and push to them specifically using this syntax:

git push github

To add a remote on github you would do this:

git remote add github git@github.com/your_user:YourRepo.git

Then you can push to appharbor to deploy, but always pull from github.

citizen conn
  • 15,300
  • 3
  • 58
  • 80
  • But I should have to do 2 push, right? One to github or assembla, and another one to appharbor? What I'm trying to do is automate this, to do only one push and get the code in both places – NicoGranelli Jul 21 '11 at 00:17
  • you could write a bash script that would do both of those things – citizen conn Jul 21 '11 at 01:08
0

You can push all projects with one command.

git remote set-url --add --push all url = heroku:path/proj.git

Then for each additional repo you want to push to:

 git remote add all github:path/proj.git
 git remote add all github:path/proj2.git

Then when you do git push heroku it will update all of your repos and heroku.

thenengah
  • 42,557
  • 33
  • 113
  • 157
  • Let me check if I understood this right: what you're saying is that I can add diferents urls to a "remote"? Remember I'm a total newbie at git. I thought each "remote" was a "repository is some remote place", but you saying that a remote could be a "collection of repositories in some remote place"? Thanks and forget my newbieness :) – NicoGranelli Jul 22 '11 at 18:38
  • All this does it push to multiple repos with on push. So if you have a repo on github and heroku if you push with this command it takes care of both. – thenengah Jul 23 '11 at 17:04