|
| 1 | +# Protocol Land Git Remote Helper |
| 2 | + |
| 3 | +The Protocol Land Git Remote Helper is a git-remote-helper designed to facilitate communication and synchronization with [Protocol Land](https://protocol.land/) repositories. |
| 4 | + |
| 5 | +## Requirements |
| 6 | + |
| 7 | +Ensure the following dependencies are installed on your system: |
| 8 | + |
| 9 | +- `git` |
| 10 | +- `node` |
| 11 | +- Choose one of the following package managers: `npm`, `yarn`, or `pnpm` |
| 12 | + |
| 13 | +To manage your Node.js installation, we recommend using `nvm`, a robust node version manager. |
| 14 | + |
| 15 | +## Installation |
| 16 | + |
| 17 | +### Using `npm` |
| 18 | + |
| 19 | +```bash |
| 20 | +npm install --global @protocol.land/git-remote-helper |
| 21 | +``` |
| 22 | + |
| 23 | +### Using `yarn` |
| 24 | + |
| 25 | +```bash |
| 26 | +yarn global add @protocol.land/git-remote-helper |
| 27 | +``` |
| 28 | + |
| 29 | +### Using `pnpm` |
| 30 | + |
| 31 | +```bash |
| 32 | +pnpm add --global @protocol.land/git-remote-helper |
| 33 | +``` |
| 34 | + |
| 35 | +## Setup Arweave Wallet Keyfile |
| 36 | + |
| 37 | +To enable `git push` or gain write access to repositories, you'll need an Arweave wallet keyfile. Assuming your Arweave wallet keyfile is stored at `~/private_folder/jwk_keyfile.json`, configure the keyfile path using `git config`: |
| 38 | + |
| 39 | +```bash |
| 40 | +git config --global --add protocol.land.keyfile ~/private_folder/jwk_keyfile.json |
| 41 | +``` |
| 42 | + |
| 43 | +> **Note:** This globally adds the keyfile path for all repositories. If you prefer to use them selectively per repository, omit the `--global` modifier in the `git config` command. |
| 44 | +
|
| 45 | +## Usage |
| 46 | + |
| 47 | +Once the package is installed, you'll have access to the `git-remote-proland` command in your `PATH` from any working directory. |
| 48 | + |
| 49 | +This command enables `git` to synchronize with [Protocol Land](https://protocol.land) repositories. |
| 50 | + |
| 51 | +### Clone Repositories |
| 52 | + |
| 53 | +Clone a repository using the following command: |
| 54 | + |
| 55 | +```bash |
| 56 | +git clone proland://YOUR_PROTOCOL_LAND_REPO_ID repo-name |
| 57 | +``` |
| 58 | + |
| 59 | +For example, to clone [Protocol Land's repository](https://protocol.land/#/repository/6ace6247-d267-463d-b5bd-7e50d98c3693), run: |
| 60 | + |
| 61 | +```bash |
| 62 | +git clone proland://6ace6247-d267-463d-b5bd-7e50d98c3693 protocol-land |
| 63 | +``` |
| 64 | + |
| 65 | +### Adding a Protocol Land Repository as a Remote |
| 66 | + |
| 67 | +To link any of Protocol Land's repositories as a remote in your Git project, use the following command: |
| 68 | + |
| 69 | +```bash |
| 70 | +git remote add origin proland://YOUR_PROTOCOL_LAND_REPO_ID |
| 71 | +``` |
| 72 | + |
| 73 | +Replace `YOUR_PROTOCOL_LAND_REPO_ID` with the specific ID of the Protocol Land repository you wish to associate with your project. This establishes a connection to the remote repository, allowing you to fetch, pull, and push changes seamlessly. |
0 commit comments