Skip to content

Moving from Git

Bring a Git repository into Atoll Forge with its whole history, commit IDs included.

af import-repository makes a new repository from a Git repository, with every commit on its default branch. Each commit keeps its Git commit ID, and the forge gives it a change ID of its own. The new repository answers nothing until the import is done, so nobody works on half a history.

You need to be an administrator, which you are on a development server. The source is a path on the server’s machine, which for a development server is yours. It can be a bare repository, or a clone, whose default branch is its origin’s. Importing straight from a URL is not supported yet.

Make a repository to import

Any Git repository will do. To follow along, make a small one with Git, as configured on your machine:

$ af-server --dev
...
$ git init -q ~/notes-git
$ cd ~/notes-git
$ echo "First note" > notes.txt
$ git add notes.txt
$ git commit -q -m "Start the notes"
$ echo "Second note" >> notes.txt
$ git commit -q -am "Add a second note"
$ git log --oneline
147f157 Add a second note
076f9ef Start the notes
$ git rev-parse HEAD
147f157448e1cdf8c51bb22ad1296f95e933b000
$ git clone -q --bare ~/notes-git ~/notes.git

Import it

Request the import. As an administrator, your request takes effect at once, unless the server requires a second administrator to approve it.

$ cd ~
$ source ~/af-dev/dev/env
$ af import-repository notes ~/notes.git
done: it took effect at once, on your word as an administrator

The import runs on the server. Follow it with af import-status; with --wait it waits until the import ends, showing its progress on a terminal while it runs, then prints where it ended and what it took in:

$ af import-status notes --wait
state: active
source: /home/you/notes.git
branch: main at 147f157448e1cdf8c51bb22ad1296f95e933b000
taken in: 2 commits, 2 trees, 2 blobs (474 B)

An import is pending until the server starts it, importing while it copies, and active once the repository is served. One the forge cannot take in ends unsupported, with a reason: line saying why, and --wait then exits with an error, so a script stops there. Without --wait, af import-status prints where the import stands now, its counts at most a second behind.

Once it is done, the new repository’s main is the Git repository’s last commit, by the same ID:

$ af --repository notes main
147f157448e1cdf8c51bb22ad1296f95e933b000

Work in it

The history is all there, each commit with its author, time and Git ID, and now a change ID too:

$ af --repository notes log
○  zzzmnnqs you@example.com 2026-11-24T12:44:45Z 147f1574
│  Add a second note
○  kymrwtuz you@example.com 2026-11-24T12:44:45Z 076f9efa
│  Start the notes
○  zzzzzzzz  1970-01-01T00:00:00Z 00000000
   (no description set)
$ af --repository notes workspace add ~/notes
Workspace at /home/you/notes
Paths: **
At landing 1, 1 file written
$ cat ~/notes/notes.txt
First note
Second note

From here you work as in any repository: see Changes and landings.

Cancel an import

An import that is still running, or one the forge could not take in, can be stopped for good. af cancel-import asks for it, approved as the import was, and the server stops the import: nothing more of it is written, it is never published, and the repository keeps its name.

$ af cancel-import notes --reason "wrong source"
done: it took effect at once, on your word as an administrator
$ af import-status notes
state: cancelled
source: /home/you/notes.git
branch: main at 147f157448e1cdf8c51bb22ad1296f95e933b000
taken in: 1 commit, 1 tree, 1 blob (220 B)

An import already in cannot be cancelled: the repository is served, and it is worked in as any other. The cancellation is recorded twice: its approval in the organization’s log, and what came of it in the repository’s own log, which its administrators can read even though the repository serves nothing else.

What carries over

From Git In Atoll Forge
Commits on the default branch Main’s history, each commit with its Git ID
Authors, times and messages Kept as they are
Other branches and tags Not imported
Later commits to the Git repository Not followed: an import happens once

Keeping a Git mirror of main, for example on GitHub, is planned and not built yet.

Type to search…

↑↓ navigate↵ selectEsc close