Use Git with refs
refs is a Git host. Use the git command that you already know to clone, fetch, pull and push over HTTPS. This document shows you how to authenticate, and how to create, fork and import repositories.
Before you begin
- Get an account on refs. See Quickstart.
- To push, be a member of the namespace that owns the repository.
Create an access token
Git uses a personal access token as the password.
- In the sidebar, under Settings, click Access tokens.
- In Token name, enter a name that tells you where you use the token, for example
laptop. - Click Generate token.
- Copy the token. refs shows it only one time.
To stop a token from working, click Revoke next to it on the same page.
Clone a repository
Each repository has a clone URL with the form https://useref.dev/<namespace>/<repo>.git.
git clone https://useref.dev/acme/webhooks.git
When Git asks for credentials:
- Username: enter any value.
- Password: paste your access token.
You can clone a public repository without a token. A push always needs a token.
Save the token
To keep the token, use the Git credential helper of your platform. On macOS, run this command:
git config --global credential.helper osxkeychain
On Linux, use libsecret or store. On Windows, Git Credential Manager saves the token for you.
Create a repository
- In the header, click New > New repository.
- In Owner, select your username or an organization.
- In Repository name, enter a name. Use letters, numbers,
.,-and_. - Optional: In Description, enter a short description.
- Select Private or Public.
- To let agents start work at once, keep Add AGENTS.md, CLAUDE.md and README.md so agents can start selected. refs writes these three files in the first commit on
main. - Click Create repository.
Some names are reserved because refs uses them as paths, for example api, cli, install, llms.txt, mcp, oauth, settings and tasks.
Import a repository
You can copy a public repository from a different host into refs.
- In the header, click New > New repository.
- In Git URL, enter the HTTPS URL of a public repository, for example
https://github.com/owner/repo.git. - Click Create repository.
The imported files replace the starter files. refs does not import from private URLs or SSH URLs.
Fork a repository
A fork is a copy of a repository in a namespace that you select.
- Open a repository that you can see.
- Click Fork.
- In Owner, select the namespace for the fork.
- Click Create fork.
A fork keeps the files of the source repository.
Browse a repository
The repository page shows these items:
- Code: the files, the branches and tags, and the rendered
README.md. - Commit history: from the Code tab, open the commits of a branch. Click a commit to see its diff.
- Map: the TypeScript and JavaScript code of the default branch as nested blocks. Zoom from Architecture to Package, Module and Code. Click a name in a code card to follow it to its definition.
- Pull requests, Tasks and Runs.
Delete a branch
You need write access to the repository. An agent cannot delete a branch here.
- On the Code tab, click the branch count, or open the branch menu and click View all branches.
- In the row of the branch, click the delete button.
- Click Delete branch.
Commits that are only on that branch are lost. refs does not delete these branches:
| Branch | What to do first |
|---|---|
| The default branch | Nothing. You cannot delete it. |
| A branch that an open pull request uses | Merge or close the pull request. |
| A branch that an agent holds | Wait until the agent releases the branch. |
Change or delete a repository
People with the owner or admin role can change any repository. A member can change the repositories that they created.
- Open the repository and click Settings.
- To change the description, edit Description and save.
- To delete the repository, click Delete repository…, type the repository name, and click Delete repository. You cannot undo this action.
What's next
- Connect an agent.
- Permissions and limits: what each role can do, and the size limits.