Browse Source

feat(ngit): update instructions

to reflect the upcoming ngit v1.0.0
master
DanConwayDev 2 years ago
parent
commit
0760598832
No known key found for this signature in database
GPG Key ID: 68E15486D73F75E1
  1. 101
      src/routes/ngit/+page.svelte

101
src/routes/ngit/+page.svelte

@ -6,79 +6,90 @@
<div class="prose m-auto mt-8"> <div class="prose m-auto mt-8">
<h2 class=""><span class="text-purple-600">n</span>git</h2> <h2 class=""><span class="text-purple-600">n</span>git</h2>
<p> <p>
a command-line tool to create, list and apply PRs and patches to git a command-line tool for managing git repositories change proposals via
repositories via nostr events. nostr
</p>
<p>
works seemlessly with <a href="https://gitworkshop.dev">gitworkshop.dev</a
>
</p> </p>
It is designed to work seemlessly with this site gitworkshop.dev.
<h3>Install</h3> <h3>Install</h3>
<p> <p>
If you have cargo installed run<code>cargo install ngit</code>. until the release of v1.0.0 you will need to clone ngit-cli `main` branch
Alternatively download: and build from source
</p> </p>
<a <div class="line-through">
href="https://github.com/DanConwayDev/ngit-cli/releases/download/v0.1.1/ngit-x86_64-unknown-linux-gnu.tar.gz" <p>
class="btn btn-neutral">Linux</a add the following binary to a directory from which it can be run
> globally:
<a </p>
href="https://github.com/DanConwayDev/ngit-cli/releases/download/v0.1.1/ngit-x86_64-apple-darwin.tar.gz" <p>
class="btn btn-neutral">Mac</a <a
> href="https://github.com/DanConwayDev/ngit-cli/releases/download/v1.0.0/ngit-x86_64-unknown-linux-gnu.tar.gz"
<a class="btn btn-neutral">Linux</a
href="https://github.com/DanConwayDev/ngit-cli/releases/download/v0.1.1/ngit-x86_64-pc-windows-msvc.zip" >
class="btn btn-neutral">Windows</a <a
> href="https://github.com/DanConwayDev/ngit-cli/releases/download/v1.0.0/ngit-x86_64-apple-darwin.tar.gz"
v.0.1.1 class="btn btn-neutral">Mac</a
<p>add the binary to a directory from which it can be run globally.</p> >
<a
href="https://github.com/DanConwayDev/ngit-cli/releases/download/v1.0.0/ngit-x86_64-pc-windows-msvc.zip"
class="btn btn-neutral">Windows</a
> TODO: issue v1.0.0 and activate these links
</p>
<p>
alternatively, if you have cargo installed run<code
>cargo install ngit</code
>
</p>
</div>
<h3>Commands</h3> <h3>Commands</h3>
<p>All commands should be run from the directory of the git repository</p> <p>run from the directory of the git repository:</p>
<p> <p>
<span class="rounded bg-neutral p-2 font-mono" <span class="rounded bg-neutral p-2 font-mono"
><span class="py-5">ngit prs create</span></span ><span class="py-5">ngit init</span></span
> >
use this when you are on a feature branch to propose it gets merged into the for maintainers to signal they are accepting proposals via nostr
remote branch by repository maintainer.
</p>
<p>
It creates a PR event and patch events for each commit that isn't also in
the main or master branch.
</p> </p>
<p> <p>
<span class="rounded bg-neutral p-2 font-mono" <span class="rounded bg-neutral p-2 font-mono"
><span class="py-5">ngit prs list</span></span ><span class="py-5">ngit send</span></span
> >
fetches a selectable list of open PRs and, if one is selected and the repository send commits on current branch as a proposal
is clean, will create a branch for it and apply the commits. If the branch
already exists it will pull any updates.
</p> </p>
<p> <p>
<span class="rounded bg-neutral p-2 font-mono" <span class="rounded bg-neutral p-2 font-mono"
><span class="py-5">ngit pull</span></span ><span class="py-5">ngit list</span></span
> >
if the repository is currently in a branch related to an existing PR, it will list proposals; optionally apply them as a new branch
pull any updates from nostr.
</p> </p>
<p>and when on a proposal branch:</p>
<p> <p>
<span class="rounded bg-neutral p-2 font-mono" <span class="rounded bg-neutral p-2 font-mono"
><span class="py-5">ngit push</span></span ><span class="py-5">ngit push</span></span
> >
if the repository is currently in a branch related to an existing PR, it will send new commits as proposal ammendments
create patch events for any new commits.
</p> </p>
<p> <p>
<span class="rounded bg-neutral p-2 font-mono" <span class="rounded bg-neutral p-2 font-mono"
><span class="py-5">ngit claim</span></span ><span class="py-5">ngit pull</span></span
> >
issue a repository nostr event which lists it on gitworkshop.dev and indicates fetch and apply new proposal commits
you are accepting patches and PRs via nostr. This can be run many times to
update the details. The relays will reflect your user relays plus blaster.
</p> </p>
<h3>Learn More</h3>
<p> <p>
It also creates an optional <span class="bg-base-200 p-2 font-mono" <span class="rounded bg-neutral p-2 font-mono"
>maintainers.yaml</span ><span class="py-5">ngit init</span></span
> file in the root of your repo that lists maintainers and relays. If commited >
it will make it smoother for contributors to find your repository event and also creates an optional
also makes any future transfer of repository ownership easier. <span class="bg-base-200 p-2 font-mono">maintainers.yaml</span> file in the
root of your repo that lists maintainers and relays. If commited it will make
it smoother for contributors to find your repository event and also makes any
future transfer of repository ownership easier.
</p> </p>
</div> </div>
</Container> </Container>

Loading…
Cancel
Save