4

I'm a bit new to git and github, but I understand how it works.

From the theory I've learnt, github or bitbucket acts as the remote repository when using git locally. Now say that I am using a tool like "cloud9" or "nitrous.io" where you can do all your development in the browser and remotely, I would like to know:

1) Is it possible to make github/bitbucket your "local" repository, without having a local git?

2) How can this be done? I assume SSH keys will be involved, but I would like to avoid using a local git and do everything between github/bitbucket and the online coding tool only.

Thanks for all the help.

Joe
  • 3,120
  • 3
  • 25
  • 30

2 Answers2

4

1/ Is it possible to make github/bitbucket your "local" repository, without having a local git?

No. GitHub or BitBucket repos are always upstream repo (top be clone), not local repo.

2/ How can this be done

From this thread, you can clone from a cloud9 console:

    git clone git@github.com:whatever

That means you have a local repo on the cloud side (on the cloud9 server).
That is one of Cloud9 key features:

Version control is essential to every codebase. That’s why git and mercurial are baked into every aspect of your Cloud9 project, from creation to the command-line.
Run git and hg commands in the command-line, just like you would on your local terminal.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • From point 2) your answer is indicating that as I would use my local system as the local repo, now I must use the cloud tool as the local repo? If this is correct, just confirm, I'll edit your answer to include this detail and mark it as answered too. Thanks for the help :) – Joe Oct 14 '13 at 22:41
  • @Joe Yes, I have edited my answer to make that point ("local repo on cloud") clearer. – VonC Oct 15 '13 at 05:13
2

Git comes pre-installed on all Nitrous.IO boxes as well. We make incredibly easy to generate an SSH key for your cloud box and then add it to Github so you can clone / push to your upstream repositories.

Here's a little guide about adding your Nitrous.IO SSH keys to Github:

http://help.nitrous.io/github-add-key/

ajhit406
  • 1,405
  • 1
  • 14
  • 17
  • Thank you! You've given me another reason to start using your service more. +points on having Django support too. – Joe Oct 15 '13 at 22:16
  • Also, I don't know if this is the best place to ask for a similar Github tool, but will BitBucket be supported any time soon? I'd like to use some private repos too. – Joe Oct 15 '13 at 22:20
  • 1
    You can use bitbucket on Nitrous.IO. We don't have shortcuts to add your nitrous.io SSH keys to Bitbucket, but you can add them manually. – ajhit406 Oct 16 '13 at 21:11