パッチの作成と適用

パッチとは、Gitが一連のファイルに適用できる書き換え指示のことです。

ローカルのコミットからパッチファイルを生成するには:

  1. Tools 」 > 「Git 」 > 「Local Repository 」の順に選択します。
  2. Patch 」 > 「Create from Commits 」を選択します。
  3. ダイアログで、パッチファイル作成の対象となるコミットを選択します。
  4. OK 」を選択します。

パッチファイルはローカルリポジトリのルートディレクトリに生成され、NNNN-Title-of-Commit.patch という形式になります。ここで、NNNN は 0000 で始まる 4 桁の数字です。

Qt Creator で開いているパッチファイルを適用するには、Tools >Git >Local Repository に移動し、Patch >Apply from Editor を選択します。

ファイルシステムから適用するパッチファイルを選択するには、[Apply from File] を選択します。

クリップボードからパッチを適用するには、Apply from Clipboard を選択します。

「Git の使用方法」および Git の使用も参照してください

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.