|
| 1 | +.. SPDX-FileCopyrightText: 2020 Veit Schiele |
| 2 | +.. |
| 3 | +.. SPDX-License-Identifier: BSD-3-Clause |
| 4 | +
|
| 5 | +Git Notes |
| 6 | +========= |
| 7 | + |
| 8 | +`Git Notes <https://git-scm.com/docs/git-notes>`_ fügen Textnotizen zu Commits, |
| 9 | +Tags und anderen Objekten hinzu. Solche Notizen können alle Arten von Metadaten |
| 10 | +enthalten, :abbr:`z.B. (zum Beispiel)` Kommentare zur Codeüberprüfung, Links zu |
| 11 | +Fehlerberichten :abbr:`usw (und so weiter)`: |
| 12 | + |
| 13 | +#. Hinzufügen einer Git-Notiz: |
| 14 | + |
| 15 | + .. code-block:: console |
| 16 | +
|
| 17 | + $ git notes add -m 'Example note' |
| 18 | +
|
| 19 | +#. Anzeigen einer Git-Notiz: |
| 20 | + |
| 21 | + .. code-block:: console |
| 22 | +
|
| 23 | + $ git log |
| 24 | + commit 859de540cda23f510f4ecbe0f38d07666e933f08 (HEAD -> main) |
| 25 | + Author: Veit Schiele <[email protected]> |
| 26 | + Date: Sun Mar 24 11:17:56 2024 +0100 |
| 27 | +
|
| 28 | + A commit message |
| 29 | +
|
| 30 | + Notes: |
| 31 | + Example note |
| 32 | +
|
| 33 | +#. Ändern einer Git-Notiz: |
| 34 | + |
| 35 | + .. code-block:: console |
| 36 | +
|
| 37 | + $ git notes edit |
| 38 | +
|
| 39 | +Git Notes werden jedoch nicht standardmäßig mit ``git push`` oder ``git pull`` |
| 40 | +an das entfernte Repository übermittelt; sie müssen mit ``git push origin |
| 41 | +'refs/notes/*'`` und ``git fetch origin 'refs/notes/*:refs/notes/*'`` |
| 42 | +synchronisiert werden. |
| 43 | + |
| 44 | +.. warning:: |
| 45 | + Verwendet nicht ``git pull`` anstelle von ``git fetch``: ihr könnt |
| 46 | + ``refs/notes/commits`` nicht mit eurem aktuellen Zweig zusammenführen. |
| 47 | + |
| 48 | +.. note:: |
| 49 | + Git Notes werden nicht in die Git-Commit-Historie aufgenommen, sodass sie |
| 50 | + nicht sind nicht für Regulatorisches verwendet werden können, bei dem die |
| 51 | + Herkunft, Nichtabstreitbarkeit oder Manipulationssicherheit nachgewiesen |
| 52 | + werden muss. Sie könnxen jedoch :abbr:`z.B. (zum Beispiel)` für Build-Tags |
| 53 | + und ähnliches nützlich sein. |
| 54 | + |
| 55 | +.. seealso:: |
| 56 | + * `Git Notes: Git’s Coolest, Most Unloved Feature |
| 57 | + <https://tylercipriani.com/blog/2022/11/19/git-notes-gits-coolest-most-unloved-feature/>`_ |
| 58 | + * `git-appraise <https://github.com/google/git-appraise>`_ |
| 59 | + * `github-issues-git-notes |
| 60 | + <https://github.com/TomasHubelbauer/github-issues-git-notes>`_ |
0 commit comments