posted this on April 16, 2012 11:45
It all depends on how you created your project. First, have you linked your Cloud9 account with your GitHub account? You can check that by going to the Dashboard and seeing if it is activated under Add-on Services (you can see how to link your GitHub account here). Now, if the Cloud9 account and the GitHub account are linked, you can just create a new repository in GitHub and then just clone from url in Cloud9 (choose Clone from url in the Dashboard). This will create a project in Cloud9 that is already linked to the repository on GitHub, so you should be able to go to the console and just do a 'git push' to update the GitHub repo.
Alternatively, you can create the Cloud9 project first (by going to the Dashboard and choosing Create a New Project). The new Cloud9 project is not yet linked to a GitHub repo. The next step is to go to GitHub and create a repo for your project. Then, follow the instructions on GitHub (we also have some instructions in the README.md file included in any new Cloud9 project). In short (in the Cloud9 console):
Add a git remote in the Cloud9 console. Should look like this (replace the git url with your repo url):
Personally, I prefer to create a repo on GitHub first, clone it and then I just add, commit and push files to GitHub. However, if you created the project in Cloud9 first, you just need to create a matching repo for it on GitHub and add a remote on the console. From that point on, the procedure is the same.