Skip to content
refs
5.1 KBRaw

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.

Sign in with the refs CLI

The refs CLI signs Git in for you. After you install it, Git uses your refs sign-in for every repository on refs. You do not create or paste a token.

  1. Install the refs CLI:

    curl -fsSL https://useref.dev/install | sh
    
  2. Sign in to refs in the browser window that opens, and click Allow.

The CLI adds itself to your global Git configuration as the credential helper for https://useref.dev. It replaces any other helper for that site. refs logout and refs uninstall remove it.

If you installed the CLI before Git sign-in was available, run refs setup again. It asks you to sign in one more time.

Create an access token

Use an access token where you cannot install the refs CLI, for example on a CI runner. Git uses the token as the password.

  1. In the sidebar, under Settings, click Access tokens.
  2. In Token name, enter a name that tells you where you use the token, for example laptop.
  3. Click Generate token.
  4. 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

With the refs CLI, Git does not ask for credentials. Without it, when Git asks for credentials:

  • Username: enter any value.
  • Password: paste your access token.

You can clone a public repository without signing in. A push always needs a sign-in.

Save an access token

To keep an access 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

  1. In the header, click New > New repository.
  2. In Owner, select your username or an organization.
  3. In Repository name, enter a name. Use letters, numbers, ., - and _.
  4. Optional: In Description, enter a short description.
  5. Select Private or Public.
  6. 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.
  7. 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.

  1. In the header, click New > New repository.
  2. In Git URL, enter the HTTPS URL of a public repository, for example https://github.com/owner/repo.git.
  3. 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.

  1. Open a repository that you can see.
  2. Click Fork.
  3. In Owner, select the namespace for the fork.
  4. 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.

  1. On the Code tab, click the branch count, or open the branch menu and click View all branches.
  2. In the row of the branch, click the delete button.
  3. 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.

  1. Open the repository and click Settings.
  2. To change the description, edit Description and save.
  3. To delete the repository, click Delete repository…, type the repository name, and click Delete repository. You cannot undo this action.

What's next