ngit clone

I was thinking that a `ngit clone ....` command might be useful.

Usage:

```bash

$ ngit clone NADDR|REPO_NAME

```

where `NADDR` is the naddr of the kind 30617 git announcement event and `REPO_NAME` can be:

* just the repository name, and it would default to searching it on gitworkshop.dev

* `@usename:repo` where username would be resolved using the logged in user's contact list (if there are no ambiguities)

* `npub|nprofile|nip05:repo`

The command would call `git clone` using the first provided clone git repository, using others as fail-overs. It would also set non-primary clone repositories as other git remotes using `git remote add`.

What do you all think? If you like it, I would like to take a shot at implementing it.

Reply to this note

Please Login to reply.

Discussion

I love it!

I was thinking about writing a remote helper so that commands felt more native to git.

Having a clone function just like you propose is essential for that.

I'd be delighted if you took a shot at implementing it!

Like

+

Fixes nostr:nevent1qqsgy6n23dwdyqs894ax2tq2ug2hwcvwu9na9hp0gkc3972re7wwfxcn7cxml

Is there a native ngit way to mark that "this proposal fixes this issue"?

Thanks for contributing to this effort.

Since your initial work on this I've been working on a more git native user flow.

I outline it a concept quick start guide here: https://gitworkshop.dev/concept

In this flow the `clone` command becomes a native `git clone` command and instead of cloning the url specified in the announcement event it has a couple of extra features.

1. nostr becomes the authority for branch refs and the git server is just used to fetch the data related to it.

2. the maintainer can change the git server without having to coordinate will all contributors and users of the repo and asking them to use a new git server

This has reached the top of my TODO list and I have begun working on it.

We spoke we both thought doing this via a git-remote-helper was the right way to go so I'll close this.