import { CopyCommand } from '#/components/molecules/copy-command.jsx'; import { account } from '#/lib/git.js'; /** * What an empty repository opens to, the way a forge lays it out: the clone * address for someone who has done this before, then the commands that make * a repository and push it, then the ones that push a repository that * exists. The instructions stay until the first push fills the repository, * so closing this page loses nothing. A repository in a space carries its * space's clone URL, which is what the server listed for it. * @param {{record: Record, space?: string}} props */ export function QuickSetup({ record, space }) { const cloneUrl = typeof record.cloneUrl === 'string' ? record.cloneUrl : `atproto://${account.handle}/${record.name}`; const remote = `git remote add origin ${cloneUrl}`; return (

Quick setup, if you have done this before

{space ? 'This repository is private. Only the people added to it can read it and push to it.' : 'Pushing needs the git helper.'}{' '} Install it with{' '} npm install -g @pdsjs/git, then{' '} git-remote-atproto login {account.handle} .

…or create a new repository on the command line

> README.md`, 'git init', 'git add README.md', 'git commit -m "first commit"', 'git branch -M main', remote, 'git push -u origin main', ]} />

…or push an existing repository from the command line

); }