概要
Lore:次世代のオープンソース バージョン管理システムです。バイナリファイルの管理に重点を置いているようです。軽く使ってみた印象としては、GitのBranchなどの概念を取り入れたSubversion(SVN)といった具合でしょうか。コマンド体系はGitに寄せてあるみたいです。以下にGit相当のLoreコマンドをまとめました。
| 操作 | Git | Lore |
|---|---|---|
| 初期化 | git init |
lore repository create lore://127.0.0.1:41337/my-project my-project |
| リポジトリをダウンロード | git clone <url> |
lore clone <url> |
| 状態確認 | git status |
lore status --scan |
| ファイルをstage | git add <filename> |
lore stage <filename> |
| ファイルをstageその2 | git add . |
lore status --scan && lore stage . |
| ファイルをunstage | git reset HEAD |
lore unstage . |
| クリーン | git clean --fdx |
lore sync --reset |
| コミット | git commit -m "message" |
lore commit "message" |
| コミットメッセージ等の書換 | git commit --amend -m "message" |
lore revision amend "message" |
| 履歴を表示 | git log |
lore revision history |
| 履歴を表示その2 | git log --oneline |
lore revision history --oneline |
| ブランチ切り替え | git switch main |
lore branch switch main |
| ブランチのマージ | git merge main2 |
lore branch merge main2 --message "Merge main2 into main" |
| 無視ファイル | .gitignore |
.loreignore |
使ってみた感想としては、使い勝手はGitにかなり似ており、gitをcliから使ったことのある人なら問題なく使いこなせる印象です。
- コマンドリファレンス: Lore CLI command reference - Lore Developer Documentation
- 公式サイト: Lore | 次世代オープン ソース バージョン管理 - Lore
- ソースコード: EpicGames/lore: Lore is a next-generation, open source version control system
- Lore自体のソースコードはGithub.comにある
- 紹介記事: Epic Gamesが大容量バイナリに強いバージョン管理システム「Lore」を公開、ゲーム制作のコードと素材をまとめて管理 - GIGAZINE
使い方まとめ
# まずは別ターミナル等でローカルにインストールしたLoreサーバを起動
~/.local/bin/loreserver
mkdir ~/my-project && cd ~/my-project
lore repository create lore://127.0.0.1:41337/my-project
# 適当なテキストファイルを配置
echo "Hello, Lore" >hello.txt
# 適当なバイナリファイルを配置
# ランダムな256byteの値をファイルとして配置
python3 -c "import os; open('sample.bin', 'wb').write(os.urandom(256))"
# `git add <files>` 相当
lore stage hello.txt sample.bin
# ディレクトリ指定でもOK。 ただ、先にscanしないとファイルの変更が認識されないようだ
# 重たいファイルの差分確認が始まってしまわないようにしているのだろう
lore status --scan
lore stage .
# git commit 相当
lore commit "Initial revision"
# ファイルを編集
echo "Add line" >>hello.txt
# sample.bin にランダムな値を1byte追記する
python3 -c "import os; open('sample.bin', 'ab').write(os.urandom(1))"
# 状態確認
lore status --scan
# 差分を表示(scan後に実施)
lore diff
# 変更を削除する場合 `git clean -fdx`相当
# lore sync --reset
# さらにコミット
lore commit "Update files"
# 履歴表示
lore revision history
# ブランチ作成
lore branch create my-first-branch
# マージ
lore branch merge my-first-branch --message "Merge my-first-branch into main"
動作確認環境
- Arch Linux
- Lore 0.8.3
公式のQuickstartをなぞる
公式の「Quickstart」の手順 Quickstart: Your first Lore repository - Lore Developer Documentation を実際にやってみます。
デモサーバの起動
curl -fsSL https://raw.githubusercontent.com/EpicGames/lore/main/scripts/install.sh | bash -s -- --demo
installing lore
######################################################################## 100.0%
installed lore 0.8.3+201 -> /home/arch/.local/bin/lore
installing loreserver
######################################################################## 100.0%
installed loreserver 0.8.3 -> /home/arch/.local/bin/loreserver
loreserver is running:
gRPC/QUIC : lore://127.0.0.1:41337
HTTP : http://127.0.0.1:41339 (health: /health_check)
logs : /tmp/loreserver-demo.log (run: tail -f /tmp/loreserver-demo.log)
Open a NEW terminal and try:
curl -i http://127.0.0.1:41339/health_check
mkdir ~/my-project && cd ~/my-project
lore repository create lore://127.0.0.1:41337/my-project
Then continue the quickstart to add, commit, and push:
https://epicgames.github.io/lore/tutorials/quickstart/
(Ctrl-C to stop the server)
デモサーバなので、データを保管していないようです。1度でもデモサーバを終了してしまうと、remoteのリポジトリがないことになっていました。存在しないリモートリポジトリにpushしようとすると、以下のエラーが出力されます。
lore push
Pushing 0b1025b1034429bb181a9896d85397bda64a650d6ac92e11b867a64cb5b563d2 to branch main
[Error] pushing branch to remote: code: 'Internal error', message: "failed to load current latest state: Not found"
lore pushしても、stateが見つからないというエラーが出力されます。
(通常サーバを起動する)
デモサーバではなく、本番(?)のサーバを起動する方法は以下になります。Deploy a local Lore Server - Lore Developer Documentation 以下のコマンドでサーバをインストールします。
curl -fsSL https://raw.githubusercontent.com/EpicGames/lore/main/scripts/install.sh | bash -s -- --server
loreserver 0.8.3 found — updating
######################################################################## 100.0%
installed loreserver 0.8.3 -> /home/arch/.local/bin/loreserver
Done. `loreserver` unpacked in /home/arch/.local/bin.
以下のコマンドでLoreサーバを起動します。
~/.local/bin/loreserver
以下のログが流れます。
Server version: 0.8.3+201
Using environment: local
Using config path: lore-server/config
Loaded config: Settings { environment: None, ... }
データーストアは、デフォルトではTempディレクトリ/tmp/lore-server配下に作られるようです。本格的に使う場合はconfigをいじって、しっかり設定したほうがよさそうですね。
ヘルスチェック
~/.local/bin配下に実行ファイルが配置されるようです。デモ用の環境がすぐ動作するようです。上記にも出力されているように、指示に従ってみます。別ターミナルを開いて、以下のコマンドを実行します。Loreサーバのヘルスチェックを行います。
curl -i http://127.0.0.1:41339/health_check
HTTP/1.1 200 OK
content-length: 0
リポジトリ作成
ローカルにサーバが立ったので、リポジトリを作ります。
mkdir ~/my-project && cd ~/my-project
lore repository create lore://127.0.0.1:41337/my-project
Created repository my-project in /home/arch/my-project with ID 019ee39dd50478d0988270cd0840f4ef
適当なテキストファイル・バイナリファイルを追加します。
# 適当なテキストファイルを配置
echo "Hello, Lore" >hello.txt
# ランダムな256byteの値をファイルとして配置
python3 -c "import os; open('sample.bin', 'wb').write(os.urandom(256))"
od sample.bin
0000000 047652 141252 072347 146244 146074 174006 047721 010774
0000020 151755 042744 116042 063472 142030 137466 170266 100427
0000040 020117 052035 010111 102457 060412 024456 037702 012327
0000060 126623 160452 113040 024536 101317 132636 164603 140301
0000100 172052 043034 172616 123165 010301 164245 016161 130375
0000120 156131 101567 024212 102735 003127 062056 022136 174263
0000140 120526 154341 146442 062174 154130 040167 014562 170566
0000160 145307 054001 012434 032151 042135 005164 116053 161264
0000200 150051 055114 176477 177673 017506 015260 030466 105201
0000220 146215 011776 047617 173050 125142 020573 110021 165475
0000240 114673 012774 150052 151503 123511 152106 062471 021627
0000260 143026 032623 040162 133525 152161 103006 141035 145021
0000300 120204 024330 104666 113152 053370 145277 045660 073561
0000320 051672 035337 053467 170122 161732 031250 170404 003421
0000340 153031 005620 144542 103755 050140 157544 035620 076776
0000360 171200 067550 161576 141664 162475 024670 115266 013211
0000400
ls
hello.txt sample.bin
ファイルをステージします。git add .相当。
lore stage hello.txt sample.bin
Staging file system changes
Staging 2 files (0 modified, 2 added, 0 deleted, 0 moved)
Staged repository state ccf076cc356da360b0a60d9625a467107d53312e0090802092fb0394cce90ba4
ディレクトリも指定できますが、差分なしという判定になりました。ディレクトリ指定の場合は、以下のようにscanを走らせないとならないようです。
lore stage .
# 以下が出力された
# Staging file system changes
# No changes staged
lore status --scan
# Repository 019ee4b8b3fa7d53867900c910699c10
# On branch main revision 0 -> 0000000000000000000000000000000000000000000000000000000000000000
# Remote revision 0 -> 0000000000000000000000000000000000000000000000000000000000000000
# Local branch in sync with remote
# Untracked files:
# A hello.txt
# A sample.bin
# Tracked changes: 2 added
#
# ok
lore stage .
# Staging file system changes
# Staging 2 files (0 modified, 2 added, 0 deleted, 0 moved)
# Staged repository state 3075a3c9be7814cb4e0e3ffea037e9eeeed90c4878625c7c949fc6fcd5369845
Gitを使っている感覚では、いちいちファイルを指定するのは面倒なのでよくgit add .してしまいます。Loreは少し違うようです。巨大なバイナリファイルの差分確認が走ってしまうのを防止する措置でしょうか。
以下のコマンドで状態を確認します。git status相当。
lore status
Repository 019ef4906b0b72f1a8d6dc6171d4c2db
On branch main revision 0 -> 0000000000000000000000000000000000000000000000000000000000000000
Remote revision 0 -> 0000000000000000000000000000000000000000000000000000000000000000
Local branch in sync with remote
Changes staged for commit:
A hello.txt
A sample.bin
コミットします。
lore commit "Initial revision"
Fragmenting files and updating tree hashes
Committing staged changes
Committed 1/1 directories, 2/2 files, 268.00 bytes/268.00 bytes (2 modified, 0 deleted)
Repository: 019ef4906b0b72f1a8d6dc6171d4c2db
Revision : 1
Signature : 8e65e80e99792edda6ee4a28e5deb45c29c6c0e7f5a13617bcd4773169038059
Branch : e726318bbc3fd75ac8733a7e030cc35b
Date : Tue, 23 Jun 2026 13:01:21 +0000
Initial revision
Commit succeeded
サーバにpushします。
lore push
Pushing 1 fragment(s)
Pushed 1 fragment(s), 124.00 bytes
Pushing 8e65e80e99792edda6ee4a28e5deb45c29c6c0e7f5a13617bcd4773169038059 to branch main
Pushed revision 1 -> 8e65e80e99792edda6ee4a28e5deb45c29c6c0e7f5a13617bcd4773169038059 to branch main
デフォルトブランチはmainのようです。
新しくclone
以下のコマンドで別のディレクトリにcloneします。
cd ~
lore clone lore://127.0.0.1:41337/my-project my-project-b --use-shared-store
以下のコマンドで状態を確認し、正常にcloneできたことを確認します。
cd ~/my-project-b && lore status && ls
Repository 019ef4906b0b72f1a8d6dc6171d4c2db
On branch main revision 1 -> 8e65e80e99792edda6ee4a28e5deb45c29c6c0e7f5a13617bcd4773169038059
Remote revision 1 -> 8e65e80e99792edda6ee4a28e5deb45c29c6c0e7f5a13617bcd4773169038059
Local branch in sync with remote
hello.txt sample.bin
別ブランチ作成
もともとのリポジトリに戻って、新しいブランチmy-first-branchを作成しそのブランチにcheckout/switchします。git checkout -b my-first-branchもしくはgit switch -c my-first-branch相当です。
cd ~/my-project
lore branch create my-first-branch
変更を作成してコミットします。
echo "Notes added on a branch." >notes.txt
lore stage notes.txt
lore commit "Add notes on a branch"
履歴の確認
ここで履歴を確認してみます。
lore revision history
Revision : 2
Signature : 3e05607736bb06b705f023129098f0c0e815e9b9b61158776ab6184576095e6a
Branch : 019ef493504a74428b3370ede11e5793
Date : Tue, 23 Jun 2026 13:02:46 +0000
Add notes on a branch
Revision : 1
Signature : 8e65e80e99792edda6ee4a28e5deb45c29c6c0e7f5a13617bcd4773169038059
Branch : e726318bbc3fd75ac8733a7e030cc35b
Date : Tue, 23 Jun 2026 13:01:21 +0000
Initial revision
ここで、Revision: 1と、Revision 2のBranchのID(?)が異なっていることが確認できます。ブランチ情報を確認します。
lore branch list
Local branches:
main
* my-first-branch
Remote branches:
main
現在いるmy-first-branchブランチの情報を確認します。
lore branch info
Branch my-first-branch
ID: 019ef493504a74428b3370ede11e5793
Latest: 3e05607736bb06b705f023129098f0c0e815e9b9b61158776ab6184576095e6a
Remote Latest: 0000000000000000000000000000000000000000000000000000000000000000
Parent: main at 8e65e80e99792edda6ee4a28e5deb45c29c6c0e7f5a13617bcd4773169038059
Created: Tue, 23 Jun 2026 13:02:35 +0000
lore branch info main
mainブランチの情報を確認します。
Branch main
ID: e726318bbc3fd75ac8733a7e030cc35b
Latest: 03d9266804e579a6d5bb6850d3f54f5567eba258b1facec79e24ec3e22001269
Remote Latest: 03d9266804e579a6d5bb6850d3f54f5567eba258b1facec79e24ec3e22001269
Created: Sat, 20 Jun 2026 11:25:56 +0000
よって、以下がブランチのIDで、Revision: 2はmy-first-branchでコミットされていることがわかりました。
- my-first-branch: 019ef493504a74428b3370ede11e5793
- main: e726318bbc3fd75ac8733a7e030cc35b
ブランチのマージ
以下のコマンドでブランチのマージを行います。
lore branch switch main
Switching branch to main, using current remote latest revision 8e65e80e99792edda6ee4a28e5deb45c29c6c0e7f5a13617bcd4773169038059
Calculating deltas 2 -> 1
Verifying 1 changes with local file system
Switched to branch main revision 8e65e80e99792edda6ee4a28e5deb45c29c6c0e7f5a13617bcd4773169038059
lore branch merge my-first-branch --message "Merge my-first-branch into main"
Starting merge of branch 019ef493504a74428b3370ede11e5793 revision 3e05607736bb06b705f023129098f0c0e815e9b9b61158776ab6184576095e6a
Branch diff branch 019ef493504a74428b3370ede11e5793 revision 3e05607736bb06b705f023129098f0c0e815e9b9b61158776ab6184576095e6a -> branch e726318bbc3fd75ac8733a7e030cc35b revision 8e65e80e99792edda6ee4a28e5deb45c29c6c0e7f5a13617bcd4773169038059
Revision diff base 8e65e80e99792edda6ee4a28e5deb45c29c6c0e7f5a13617bcd4773169038059 source 3e05607736bb06b705f023129098f0c0e815e9b9b61158776ab6184576095e6a target 8e65e80e99792edda6ee4a28e5deb45c29c6c0e7f5a13617bcd4773169038059
Calculating 3-way diff between
base 1 -> 8e65e80e99792edda6ee4a28e5deb45c29c6c0e7f5a13617bcd4773169038059
source 2 -> 3e05607736bb06b705f023129098f0c0e815e9b9b61158776ab6184576095e6a
target 1 -> 8e65e80e99792edda6ee4a28e5deb45c29c6c0e7f5a13617bcd4773169038059
Diff source branch revisions (streaming)
Sorting 1 source changes
Diff target branch revisions (streaming)
Merged files, 1 updated, 0 deleted, 0 merged, 0 conflicted
Staged merged repository state 17e30ab7a924cbc83ce7ad45a47b319ee30afc8ac5c457b5ccb64870e5a840f6
Fragmenting files and updating tree hashes
Stored history for 3 nodes
Committed merged repository state 3 -> ad41015f5f31cb554a19470da379c7473d78398d4596d2715ed09ccc80164ce3
マージしたコミットad41015f5f31cb554a19470da379c7473d78398d4596d2715ed09ccc80164ce3が作られたようです。確認し、pushします。
lore push
サーバから取得(pull)
git pull相当のコマンドを試します。まずは別で作ったリポジトリmy-project-bに戻って現状の履歴を確認してみます。
cd ~/my-project-b
lore revision history
Revision : 1
Signature : 8e65e80e99792edda6ee4a28e5deb45c29c6c0e7f5a13617bcd4773169038059
Branch : e726318bbc3fd75ac8733a7e030cc35b
Date : Tue, 23 Jun 2026 13:01:21 +0000
Initial revision
Revision 1しかありません。pull(lore sync)してみます。
lore sync
Sync from remote lore://127.0.0.1:41337
On branch main revision 1 -> 8e65e80e99792edda6ee4a28e5deb45c29c6c0e7f5a13617bcd4773169038059
Synchronizing to revision 3 -> ad41015f5f31cb554a19470da379c7473d78398d4596d2715ed09ccc80164ce3
Calculating deltas 1 -> 3
Verifying 1 changes with local file system
同様に、履歴を確認してみます。
lore revision history
Revision : 3
Signature : ad41015f5f31cb554a19470da379c7473d78398d4596d2715ed09ccc80164ce3
Merge : 3e05607736bb06b705f023129098f0c0e815e9b9b61158776ab6184576095e6a
Branch : e726318bbc3fd75ac8733a7e030cc35b
Date : Tue, 23 Jun 2026 13:05:07 +0000
Merge my-first-branch into main
Revision : 1
Signature : 8e65e80e99792edda6ee4a28e5deb45c29c6c0e7f5a13617bcd4773169038059
Branch : e726318bbc3fd75ac8733a7e030cc35b
Date : Tue, 23 Jun 2026 13:01:21 +0000
Initial revision
マージ後のデータが取得できていることがわかります。
その他のコマンド確認
差分確認 lore diff
差分の確認方法を示します。まずは差分を作り出します。
# 変更
echo "Add text." >>note.txt
# ファイル追加
echo "Add new file." >test.txt
# ファイル削除
rm -f hello.txt
# sample.bin にランダムな値を1byte追記する
python3 -c "import os; open('sample.bin', 'ab').write(os.urandom(1))"
od sample.bin
0000000 047652 141252 072347 146244 146074 174006 047721 010774
0000020 151755 042744 116042 063472 142030 137466 170266 100427
0000040 020117 052035 010111 102457 060412 024456 037702 012327
0000060 126623 160452 113040 024536 101317 132636 164603 140301
0000100 172052 043034 172616 123165 010301 164245 016161 130375
0000120 156131 101567 024212 102735 003127 062056 022136 174263
0000140 120526 154341 146442 062174 154130 040167 014562 170566
0000160 145307 054001 012434 032151 042135 005164 116053 161264
0000200 150051 055114 176477 177673 017506 015260 030466 105201
0000220 146215 011776 047617 173050 125142 020573 110021 165475
0000240 114673 012774 150052 151503 123511 152106 062471 021627
0000260 143026 032623 040162 133525 152161 103006 141035 145021
0000300 120204 024330 104666 113152 053370 145277 045660 073561
0000320 051672 035337 053467 170122 161732 031250 170404 003421
0000340 153031 005620 144542 103755 050140 157544 035620 076776
0000360 171200 067550 161576 141664 162475 024670 115266 013211
0000400 000361
0000401
最後のコミットからの差分を確認します。git diff相当のコマンドは lore diff でいいようです。
lore diff
hello.txt
--- hello.txt@3
+++ /dev/null
@@ -1 +0,0 @@
-Hello, Lore
note.txt
--- /dev/null
+++ note.txt
@@ -0,0 +1 @@
+Add text.
sample.bin
Binary files differ
test.txt
--- /dev/null
+++ test.txt
@@ -0,0 +1 @@
+Add new file.
少し分かりづらいですね。バイナリファイルの差分内容は表示されません。
lore status
Repository 019ef4906b0b72f1a8d6dc6171d4c2db
On branch main revision 3 -> ad41015f5f31cb554a19470da379c7473d78398d4596d2715ed09ccc80164ce3
Remote revision 3 -> ad41015f5f31cb554a19470da379c7473d78398d4596d2715ed09ccc80164ce3
Local branch in sync with remote
変更を除去します。最後のコミットの状態にします。git clean -fdx相当です。
lore sync --reset
lore diff
# 何も表示されない
無視ファイル .loreignore
.gitignore相当のものがあるようです。
touch ignore_sample.abc
echo '*.abc' >>.loreignore
mkdir -p .local
touch .local/some_file.txt
echo '*.txt' >.local/.loreignore
リポジトリのルート直下と、サブディレクトリ.localに.loreignoreを配置しました。動作を確認してみます。
lore status --scan
Repository 019ef4906b0b72f1a8d6dc6171d4c2db
On branch main revision 3 -> ad41015f5f31cb554a19470da379c7473d78398d4596d2715ed09ccc80164ce3
Remote revision 3 -> ad41015f5f31cb554a19470da379c7473d78398d4596d2715ed09ccc80164ce3
Local branch in sync with remote
Untracked files:
A .local/
A .loreignore
A .local/some_file.txt
A .local/.loreignore
Tracked changes: 4 added
.local/some_file.txtは無視されていません。リポジトリ直下に配置した.loreignoreのみが有効のようです。
バグ?それともGitとは異なり、リポジトリルートの .loreignore に集約して記述する思想なのかもしれない。