---
title: "af import-repository"
description: "Request a new repository imported from a Git repository"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.forge.workreef.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# af import-repository

<!-- Generated by tools/gen-reference.mjs from `af import-repository --help`. Change the help text in crates/atoll-forge-cli/src/main.rs, then run `npm run gen:reference`. -->

Imports every commit on the source's default branch, once, and each commit keeps its Git ID. The new repository is unavailable until the import finishes. Requires an administrator; it takes effect at once unless the forge requires a second administrator.

## Usage

```text
af import-repository [OPTIONS] <NAME> <SOURCE>
```

## Arguments

- `<NAME>`

  Repository name: letters, digits, `.`, `-` and `_`

- `<SOURCE>`

  Path to the Git repository on the forge's server nodes

  Its default branch is imported: `HEAD` for a bare repository, or `refs/remotes/origin/HEAD` for a checkout. Remote URLs are not supported yet.

## Options

- `--reason <REASON>`

  Reason for the request, recorded with it

  Default: `""`

## Global options

Every `af` command also takes the [global options](https://docs.forge.workreef.dev/reference/af/#global-options).

## Examples

```sh
af import-repository web /srv/git/web.git --reason "moving to the forge"
```

Source: https://docs.forge.workreef.dev/reference/af/import-repository/index.mdx
