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

# ファイル履歴

> ファイル履歴の自動セーブポイントを使ってコードの以前のバージョンを復元する方法について説明します。

プロジェクトエディターでテキストファイルを開き、右下隅の**History**ボタンを押して始めます。

<Frame>
  <img src="https://mintcdn.com/replit/AZ1L8RlIroSxuJDa/images/programming-ide/history-button.png?fit=max&auto=format&n=AZ1L8RlIroSxuJDa&q=85&s=af81288cec5195969d95713cf3904609" alt="履歴を開く" width="377" height="292" data-path="images/programming-ide/history-button.png" />
</Frame>

## ファイルの以前のバージョンを表示する

ファイル履歴を開くと、スクロールバー、矢印ボタン、または**左右**の矢印キーを使ってファイルの以前のバージョンを表示できます。

<Frame>
  <img src="https://mintcdn.com/replit/-6g2hQCrMskerX65/images/animations/history-versioning.gif?s=0ea4ddbe452557870f88eff87b3960dd" alt="スクロールバーのデモ" width="764" height="720" data-path="images/animations/history-versioning.gif" />
</Frame>

## 以前のバージョンと現在のファイルを比較する

ファイル履歴ペインの左下にある「Compare Latest」トグルを押すと、その時点のファイルと最新バージョンのインライン比較が表示されます。

<Frame>
  <img src="https://mintcdn.com/replit/-6g2hQCrMskerX65/images/animations/compare-history.gif?s=96b290dc3ded58a6eb2e0bbd70c72285" alt="最新と比較する画像" width="772" height="720" data-path="images/animations/compare-history.gif" />
</Frame>

## ファイルの以前のバージョンを復元する

ファイルを以前のバージョンに復元したい場合は、`Restore`ボタンを押すだけで復元されます。履歴が消えることはありません。以前のバージョンに復元すると、そのバージョンがファイルの履歴に新しいバージョンとして追加されます。

<Frame>
  <img src="https://mintcdn.com/replit/-6g2hQCrMskerX65/images/animations/restore-history.webp?fit=max&auto=format&n=-6g2hQCrMskerX65&q=85&s=bb106086874ec8cd69cf7f5c2f1b6efb" alt="履歴の復元画像" width="720" height="495" data-path="images/animations/restore-history.webp" />
</Frame>

## ファイル履歴の再生を表示する

ファイル履歴の再生機能を使うと、ファイルの変化を映画のように時系列で見ることができます。プログラミングセッションの動画を作成するのに便利です。

<Frame>
  <img src="https://mintcdn.com/replit/-6g2hQCrMskerX65/images/animations/history-replay.webp?fit=max&auto=format&n=-6g2hQCrMskerX65&q=85&s=35f40811914251d499fe2d64015a2227" alt="履歴の再生動画" width="720" height="528" data-path="images/animations/history-replay.webp" />
</Frame>
