Introduce Git Revert functionality to SCM-Manager

This commit is contained in:
Till-André Diegeler
2025-02-27 11:11:57 +01:00
parent 99f6422577
commit f0f7e922bf
72 changed files with 2612 additions and 649 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 KiB

View File

@@ -84,6 +84,24 @@ Es muss lediglich ein gewünschter Name angegeben werden, welcher die gleichen F
![Repository-Code-Changeset-Create-Tag](assets/repository-code-changeset-create-tag.png)
#### Reverts
In Changesets innerhalb von Git-Repositories steht in der oberen rechten Ecke (unter "Tag erstellen") ein Knopf zum Reverten des Commits.
**Hinweis:** Der Revert-Knopf wird nur dann angezeigt, wenn der Commit genau einen Vorgänger hat.
Commits mit mehr als einem Vorgänger (z.B. Merge-Commits) und initiale Commits ohne Vorgänger können nicht zurückgesetzt werden.
![Repository-Code-Changeset-Revert](assets/repository-code-changeset-revert.png)
Für einen Revert ist nach Drücken des Knopfs ein Branch auszuwählen, auf welchem der Revert angewendet wird.
Gelangt man aus der Commit-Übersicht eines Branches in den Commit, ist die Auswahl automatisch vorgenommen.
Ebenso kann eine Commit-Nachricht für den Revert angegeben werden.
Sie ist automatisch ausgefüllt; es empfiehlt sich jedoch aus Gründen der Übersichtlichkeit, in dieser den Revert zu begründen.
Mit Drücken von "Revert" wird man auf den neu erstellten Revert-Commit automatisch weitergeleitet, sofern kein Fehler auftritt.
![Repository-Code-Changeset-Revert-Modal](assets/repository-code-changeset-revert-modal.png)
### Datei Details
Nach einem Klick auf eine Datei in den Sources landet man in der Detailansicht der Datei. Dabei sind je nach Dateiformat unterschiedliche Ansichten zu sehen:

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 KiB

View File

@@ -85,6 +85,24 @@ Only a name has to be provided that meets the same formatting conditions as bran
![Repository-Code-Changeset-Create-Tag](assets/repository-code-changeset-create-tag.png)
#### Reverts
Changesets within Git repositories provide a "Revert" button at the upper right-hand corner (beneath "Create Tag").
**Note:** The revert button is only displayed on commits with exactly one parent element.
Commits with multiple predecessors (e.g. merge commits) and initial commits without parent cannot be reverted.
![Repository-Code-Changeset-Revert](assets/repository-code-changeset-revert.png)
After pressing the button and before reverting a changeset, you need to first select the branch where it is applied upon.
This selection is already filled out if you reached the changeset by the changeset overview of a specific branch.
Furthermore, you may type a commit message for the revert.
It is filled out with a default message; however, it is recommended to choose a reasonable custom message in order to keep the changeset history comprehensible.
By pressing "Revert", you're going to be forwarded to the newly created commit including the revert if no error occurs.
![Repository-Code-Changeset-Revert-Modal](assets/repository-code-changeset-revert-modal.png)
### File Details
After clicking on a file in the sources, the details of the file are shown. Depending on the format of the file, there are different views: