# バージョン管理統合サポート

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/ja-jp/help/clion/llms.txt).

CLion は二つのレベルでバージョン管理統合をサポートしています:

* IDE レベルでは、VCS 統合は、デフォルトで有効になって [いるバンドルされたプラグイン](managing-plugins.html)のセットを通じて提供されます。

* プロジェクト レベルでは、プロジェクト フォルダーを一つまたは複数のバージョン管理システムに関連付けることで、VCS 統合が有効化されます。

##  プロジェクトルートをバージョン管理システムに関連付ける 

CLion allows you to quickly enable your project's integration with a version control system and associate it with the project root. 個別のプロジェクトディレクトリを異なるバージョン管理システムに関連付ける方法の詳細については、「 [ディレクトリをバージョン管理システムに関連付ける](#associate_directory_with_VCS)」を参照してください。

Procedure:

1. `Alt+`` (Windows), `⌃ V` (macOS), `⌃ V` (IntelliJ IDEA Classic (macOS)), `⌃ C` (macOS System Shortcuts), `Alt+`` (XWin), `Alt+`` (GNOME), `Alt+`` (KDE), `Alt+`` (Emacs), `Alt+`` (Sublime Text), `Alt+`` (Sublime Text (macOS)), `⌃ S` (Xcode), `Ctrl+Alt+Q` (Visual Studio), `⌃ V` (Visual Studio (macOS)), `Alt+`` (ReSharper), `⌃ V` (ReSharper (macOS)), `Alt+`` (QtCreator), `⌃ V` (QtCreator (macOS)), `Alt+`` (NetBeans), `Alt+`` (Eclipse), `⌃ V` (Eclipse (macOS)) を押して   VCS 操作のポップアップ   を開き、   バージョン管理連携の有効化   を選択します。

あるいは、  `VCS｜バージョン管理連携の有効化`  に進みます。

2. 開いた   バージョン管理連携の有効化   ダイアログで、 [プロジェクトルート](project.html#project_root)に関連付けるバージョン管理システムを選択します。

3. VCS 統合を有効化した後、CLion は VCS を使ってプロジェクト設定ファイルを共有するかどうかを確認します。   常に追加   を選択すると、CLion で作業する他のリポジトリユーザーとプロジェクト設定を同期できます。

![設定ファイルの扱い方を選択するよう促す通知](https://resources.jetbrains.com/help/img/idea/2026.3/sharing-project-notification.png)

これは Git および Mercurial にのみ適用されることに注意してください。

次の手順については、 [Git リポジトリの設定](set-up-a-git-repository.html) を参照してください。

## ディレクトリマッピングを構成する

CLion は、ディレクトリベースのバージョン管理モデルをサポートしています。つまり、各プロジェクトディレクトリを異なるバージョン管理システムに関連付けることができます。

Procedure: ディレクトリをバージョン管理システムに関連付ける

1. `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `⌘ Comma` (Xcode), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (ReSharper), `⌘ Comma` (ReSharper (macOS)), `Ctrl+Alt+S` (QtCreator), `⌘ Comma` (QtCreator (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) を押して設定を開き、  `バージョン管理｜ディレクトリマッピング`  を選択します。

2. ディレクトリマッピング   ページには、プロジェクトディレクトリとそれに関連付けられたバージョン管理システムのリストが表示されます（ディレクトリが追加されていない場合、リストにはプロジェクトルートのみが含まれます）。

3. 右側の   追加   ボタン ![](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.add.svg) をクリックします。

4. 開いた   VCS ディレクトリマッピングの追加   ダイアログで、   ディレクトリ   オプションを選択します。 バージョン管理システムに関連付けるディレクトリへのパスを入力するか、   閲覧   ボタン ![参照ボタン](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.open.svg) をクリックして、表示されるダイアログでディレクトリを選択します。

5. VCS   リストから、このディレクトリ内のファイルを制御するために使用されるバージョン管理システムを選択します。 Note that this list only contains the version control systems for which the corresponding [plugins](managing-plugins.html) are currently enabled.

6. OK   をクリックしてマッピングを保存し、   ディレクトリマッピング   ページに戻ります。

### 未登録のディレクトリを管理する

For projects with Git or Mercurial integration enabled, CLion scans project directories to check if there are Git/Mercurial repositories that are not controlled by the IDE. If such repositories are detected, CLion displays a notification.

未登録のルートを追加するには、通知内の   ルートの追加   リンクをクリックします。 または、 [バージョン管理の設定ページ](settings-version-control.html)を開き、追加する未登録のルート (灰色でマークされています) を選択し、 [ディレクトリをバージョン管理システムに関連付ける](#associate_directory_with_VCS)の手順に従います。

これらのルートについて通知されたくない場合は、通知内の   無視する   リンクをクリックしてください。 Note that if new unregistered repositories are added to the project, CLion will notify you about them.

Procedure: VCS の関連付けを変更する

1. `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `⌘ Comma` (Xcode), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (ReSharper), `⌘ Comma` (ReSharper (macOS)), `Ctrl+Alt+S` (QtCreator), `⌘ Comma` (QtCreator (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) を押して設定を開き、  `バージョン管理｜ディレクトリマッピング`  を選択します。

2. ディレクトリマッピング   ページには、プロジェクトディレクトリとそれに関連付けられたバージョン管理システムのリストが表示されます（ディレクトリが追加されていない場合、リストにはプロジェクトルートのみが含まれます）。

3. 別のバージョン管理システムに置きたいディレクトリに対応する行を見つけます。

4. VCS   列をクリックしてください。 表示されたリストから、新しいバージョン管理システムを選択します。

> **Note:**
> なし   を選択すると、選択したディレクトリの VCS 統合は無効になります。

5. OK   をクリックしてマッピングを保存し、   ディレクトリマッピング   ページに戻ります。

## See also

### プロシージャ

[バージョン管理](version-control-integration.html)

### リファレンス

[バージョン管理の設定](settings-version-control.html) [バージョン管理ウィンドウ](version-control-tool-window.html)

