Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Working with Github clones and local repos: Cloud9 IDE

I recently tried using the Cloud9 online IDE. It starts by creating a clone of your Github repo. My regular local use of git is fairly simple (init, status, commit, push to Github, branch, edit, pull, merge...), but because I don't usually clone, I haven't got my autopilot head around how to:

  • push changes made in my C9 clone back to the original repo in Github.

this outline guide suggests using the same username for github and C9, but a no-clutter step-by-step is what I'm looking for...

like image 693
Dave Everitt Avatar asked Mar 27 '12 12:03

Dave Everitt


People also ask

Can I clone a local Git repository?

Usage. git clone is primarily used to point to an existing repo and make a clone or copy of that repo at in a new directory, at another location. The original repository can be located on the local filesystem or on remote machine accessible supported protocols. The git clone command copies an existing Git repository.

How do I clone a local repository to a remote?

To clone a Git repository, you will first copy the remote URL from your repository hosting service—in this case GitHub. You will then use the Git clone command followed by the remote repo's URL. If you are working with a private repository, you will be prompted for your remote hosting service credentials.


2 Answers

If you auth with your Github account in cloud9 and clone a Github project, then if you git push it will push to the original repo in Github

[JJ] If you cloned the project in Cloud9 before (via the command line, so not via the UI on the dashboard), you can do git remote add upstream [email protected]:your/repo.git. Now you have another remote that you can either pull from (git pull upstream master or push to git push upstream master).

like image 103
plus- Avatar answered Nov 15 '22 01:11

plus-


Commit as usual using the C9 CLI, then simply run git push from the C9 CLI, as you would normally when developing on your machine.

like image 43
brice Avatar answered Nov 15 '22 01:11

brice