Opret og anvend patches

Patches er omskrivningsinstruktioner, som Git kan anvende på et sæt filer.

Sådan genereres patchfiler fra lokale commits:

  1. Gå til Tools > Git > Local Repository.
  2. Vælg Patch > Create from Commits.
  3. Vælg de commits, der skal bruges til oprettelse af patchfiler, i dialogboksen.
  4. Vælg OK.

Patchfilerne genereres i rodmappen i det lokale repository og følger skemaet NNNN-Titel-på-commit.patch, hvor NNNN er et firecifret tal, der starter med 0000.

For at anvende en patchfil, der er åben i Qt Creator, skal du gå til Tools > Git > Local Repository og vælge Patch > Apply from Editor.

For at vælge den patchfil, der skal anvendes fra filsystemet, skal du vælge Apply from File.

For at anvende en patch fra udklipsholderen skal du vælge Apply from Clipboard.

Se også Sådan gør du: Brug af Git og Brug af 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.