Quick Start

pre-requesite: install ngit and git-remote-nostr

Installation Options

1. Build from Source
  • Install rust and cargo
  • clone this git url
  • checkout the latest release tag (v1.6.1)
  • run cargo build --release
  • move the following binaries to your PATH:
    ./target/release/ngit
    ./target/release/git-remote-nostr
2. Install with Cargo
3. Install with Nix
  • Add ngit as a flake input:
    { inputs = { ngit.url = "github:DanConwayDev/ngit-cli"; } }
  • include default packages. eg when using home-manager:
    { inputs, ... }: { home-manager.users.myuser = { pkgs, ... }: { home.packages = [ inputs.ngit.packages."${pkgs.system}".default ]; } }
4. Download Compiled Binaries

Download the pre-built binaries for your platform and add them to your PATH:

Ubuntu arm

After installation, run the following commands to ensure both binaries are in your PATH:

ngit
git-remote-nostr

Contributor Quick Start

pre-requesite: install ngit and git-remote-nostr

1. find repository

  • search gitworkshop.dev/search for the repository
  • explore PRs and issues
  • copy the git clone url (or press the green clone button to copy the clone command)

2. clone repository

  • using your prefered git client or with the git command you just copied:
    git clone nostr://npub123/repo-identifier

3. submit PR

  • push a branch with the prefix `pr/` for example using git commands:
    git checkout -b pr/great-feature
    git commit -am "improve the world"
    git push -u
  • OR for more options such as including a cover letter use ngit:
    ngit send

4. view PRs

  • for open PRs view remote branches with prefix `pr/` for example using git command:
    git branch -r --list origin/pr/*
  • OR using ngit:
    ngit list

5. update PR

  • if you are the PR author, or a maintainer you can add commits to a PR:
    git commit -am "extra thing"
    git push
  • or revising it:
    git commit -a -amend
    git push --force

Maintainer Quick Start

pre-requesite: install ngit and git-remote-nostr

1. create a git repo and push to a git server

  • for example using git commands:
    git init
    git commit -am "initial commit"
    // create repository on git server and the:
    git remote add origin https://dm.co/usr/my-repo.git
    git push -u origin master

2. initialize on nostr

  • initialize:
    ngit init
  • use the nostr remote to push state to nostr and git server(s):
    git remote set-url origin nostr://npub123/my-repo
  • ensure all maintainers push to the nostr remote and not git server directly so that state on nostr remains in sync

3. view PRs

  • for open PRs view remote branches with prefix `pr/` for example using git command:
    git branch -r --list origin/pr/*
  • OR using ngit with more options such as applying them directly:
    ngit list

4. merge / incorporate PRs

  • the PR status will be automatically updated if you merge the branch:
    git checkout master
    git merge pr/great-feature(e8246b2)
    git push
  • use gitworkshop.dev to make comments or manually set the status.
    ngit list

5. consider turning off PRs and issues elsewhere

  • ie. on git server(s) so they are managed solely on nostr.
  • Note: for github use Repo Settings > Features for issues but turning off PRs isn't yet possible.
gitworkshop.dev logo GitWorkshop.dev