创建和应用补丁

补丁是 Git 可以应用于一组文件的重写指令。

从本地提交生成补丁文件

  1. 转到Tools >Git >Local Repository
  2. 选择Patch >Create from Commits
  3. 在对话框中选择要创建补丁文件的提交。
  4. 选择OK

补丁文件会在本地版本库的根目录下生成,并遵循NNNN-Title-of-Commit.patch 方案,其中NNNN是以0000 开头的四位数字。

要应用在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.