From c9671dae656dda9a4cbe18aa7d6406c64ecac47e Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Tue, 20 May 2025 11:02:56 +0200 Subject: [PATCH] Doc: Describe viewing diff of staged changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTCREATORBUG-32575 Change-Id: I57bf02a18a2124ecc9cb54caeb66bce0b0310aa9 Reviewed-by: André Hartmann --- dist/changelog/changes-17.0.0.md | 1 + doc/qtcreator/src/vcs/creator-vcs-git.qdoc | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/dist/changelog/changes-17.0.0.md b/dist/changelog/changes-17.0.0.md index 5aab25bc93f..b2ca21aebe7 100644 --- a/dist/changelog/changes-17.0.0.md +++ b/dist/changelog/changes-17.0.0.md @@ -188,6 +188,7 @@ Version Control Systems values * Added actions for staged changes ([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 * Added the option to create annotated tags to the `Create Branch` dialog * Added a `Diff & Cancel` option to the `Uncommitted Changes Found` dialog diff --git a/doc/qtcreator/src/vcs/creator-vcs-git.qdoc b/doc/qtcreator/src/vcs/creator-vcs-git.qdoc index 4f63b0372fd..5283355221b 100644 --- a/doc/qtcreator/src/vcs/creator-vcs-git.qdoc +++ b/doc/qtcreator/src/vcs/creator-vcs-git.qdoc @@ -286,6 +286,21 @@ \li Removes the selected lines from the staging area. \endtable + To view a diff of staged changes: + + \list + \li To view staged changes in the current file, go to \uicontrol Tools > + \uicontrol Git > \uicontrol {Current File} and select + \uicontrol {Diff Staged Changes in }. + \li To view staged changes in the current project directory, go to + \uicontrol Tools > \uicontrol Git > + \uicontrol {Current Project Directory} and select + \uicontrol {Diff Staged Directory of Changes}. + \li To view staged changes in the local repository, go to + \uicontrol Tools > \uicontrol Git > \uicontrol {Local Repository} and + select \uicontrol {Diff Staged}. + \endlist + \if defined(qtcreator) \sa {Use Git}{How To: Use Git}, {Git} \endif