diff --git a/dist/changelog/changes-17.0.0.md b/dist/changelog/changes-17.0.0.md index b2ca21aebe7..879d71d307d 100644 --- a/dist/changelog/changes-17.0.0.md +++ b/dist/changelog/changes-17.0.0.md @@ -190,6 +190,7 @@ Version Control Systems ([QTCREATORBUG-32361](https://bugreports.qt.io/browse/QTCREATORBUG-32361)) ([Documentation](https://doc-snapshots.qt.io/qtcreator-17.0/creator-how-to-git-diff.html)) * Added `Revert` to the actions in the `Instant Blame` tooltip + ([Documentation](https://doc-snapshots.qt.io/qtcreator-17.0/creator-how-to-git-reset.html)) * Added the option to create annotated tags to the `Create Branch` dialog * Added a `Diff & Cancel` option to the `Uncommitted Changes Found` dialog ([QTCREATORBUG-25795](https://bugreports.qt.io/browse/QTCREATORBUG-25795)) diff --git a/doc/qtcreator/images/qtcreator-git-instant-blame.webp b/doc/qtcreator/images/qtcreator-git-instant-blame.webp index 05dcb286f12..d94a46b0191 100644 Binary files a/doc/qtcreator/images/qtcreator-git-instant-blame.webp and b/doc/qtcreator/images/qtcreator-git-instant-blame.webp differ diff --git a/doc/qtcreator/src/vcs/creator-vcs-git.qdoc b/doc/qtcreator/src/vcs/creator-vcs-git.qdoc index 5283355221b..00f561461b1 100644 --- a/doc/qtcreator/src/vcs/creator-vcs-git.qdoc +++ b/doc/qtcreator/src/vcs/creator-vcs-git.qdoc @@ -501,7 +501,8 @@ \title git blame By default, each line is annotated in the editor when you move the cursor - through a file. Hover over the annotation to view commit details. + through a file. Hover over the annotation to view commit details and to apply + actions to the commit. \image {qtcreator-git-instant-blame.webp} {Instant blame in the code editor} \caption Instant blame in the code editor @@ -616,11 +617,11 @@ the next commit. Git allows you to revert back to the state of the last commit as well as to the state staged in the index. - \section1 Revert changes in the current file + \section1 Reset all uncommitted changes in the current file - To revert all changes and reset the current file to the state of the index, - go to \uicontrol Tools > \uicontrol Git > \uicontrol {Current File} and - select \uicontrol {Undo Unstaged Changes for }. + To undo all unstaged changes and reset the current file to the state of the + index, go to \uicontrol Tools > \uicontrol Git > \uicontrol {Current File} + and select \uicontrol {Undo Unstaged Changes for }. To return the current file to the state it was in right after the last commit, select \uicontrol {Undo Uncommitted Changes for }. This reverts @@ -650,6 +651,16 @@ To recover removed files, select \uicontrol {Recover Deleted Files}. + \section1 Revert commits in the editor + + To revert the commit you are currently hovering over, select + \uicontrol {Revert } in the annotation view. + + \image {qtcreator-git-instant-blame.webp} {Instant blame in the code editor} + \caption Actions in the annotation view for instant blame + + You are asked to confirm the reversion. + \if defined(qtcreator) \sa {Use Git}{How To: Use Git}, {Git} \endif