christkv / node-git

A node.js git implementation modeled on ruby-git
242 stars 42 forks source link

Add git remote #39

Closed jviotti closed 2 years ago

jviotti commented 9 years ago

I'm trying to figure out how to to the equivalent of:

$ git remote add <remote>

Which is a little bit difficult due to the lack of documentation and the remote example does not cover much usage cases.

Thanks in advance!

jankeromnes commented 9 years ago

Hi, sorry for the delay. I'm not the original author of node-git, just giving a hand maintaining it.

I'm not sure remotes are fully implemented, because the constructor only seems to care about a name and a commit hash (so no url?).

But in any case, it looks like Remote objects are added like other Ref objects (e.g. Tag and Head) to a Repo, probably with repo.update_ref.

To see what remotes a repo has, you could proceed like in test file.

Hope these pointers will help you somewhat!

jviotti commented 2 years ago

Closing stale issues