Ngit is a command-line tool to send and review patches via nostr
-
works seemlessly with GitWorkshop
-
compatible with NIP-34
-
enables proposals to be managed as branches, similar to GitHub PRs
Commands
run from the directory of the git repository:
-
ngit initsignal you are this repo’s maintainer accepting proposals via nostr -
ngit sendissue commits as a proposal -
ngit listlist proposals; checkout, apply or donwload selected
and when on a proposal branch:
-
ngit pushsend proposal revision -
ngit pullfetch and apply new proposal commits / revisions linked to branch
Instructions for new users
Initialization
This program consists of two parts: Ngit and GitWorkshop
-
Install ngit on your computer (Linux or WSL), using the installation instructions in the next section.
-
Initialize it in the git repo folder you want to use, with the
ngit initcommand. -
Repeat for every git repo folder.
You’ll end up with a maintainers.yaml file containing the people responsible for the repo and the relays that the repo events should post to (in addition to the ngit default relays).
It will then automatically appear as a repo event in GitWorkshop, when you go there, and be listed under your profile there. It will display the information, as you typed it in during initialization.
Usage
If you want to clone a git repo, just use 'git clone'. Also, pulling and pushing to origin is still over git, not ngit.
You make a local commit and type 'ngit send' and it sends that commit (you can select multiple commits) to the relays as a proposal linked to the repo event. You may include a cover sheet.
Anyone else can comment on it and then anyone can pull it into their local clone and then merge it to origin (if they have access to origin). You can also have the commits in branches.
You can also push updates to a proposal you have made. If you had a typo, or whatever. Just make a new commit and then ngit push.
Installation
Zapstore
Ngit is available on Zapstore.
Cargo
Install the tool with cargo install ngit, use a prebuilt binary or build from source off the master branch.
Contributions Welcome!
Use ngit to submit items for ngit.
gitworkshop.dev/repo/ngit to report issues and see proposals
Comments
Public conversation about this article.
No comments yet.
Article metadata
About this entry
Event Id
Raw event
Other authors
No one else has published this topic yet.