Currently there is only an option to discard all changes to an unstaged file when right clicking the file in the file list of the Git view. It would be nice to be able to discard specific lines and hunks within unstaged diffs to give finer control than discarding all changes in the file.
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/864
Git commit d134b7263b7bb0615c6ec12f5169039545f1470d by Christoph Cullmann, on behalf of Waqar Ahmed. Committed on 29/08/2022 at 17:38. Pushed by cullmann into branch 'master'. Git: Add Discard Lines M +20 -15 addons/project/gitwidget.cpp M +2 -1 addons/project/gitwidget.h https://invent.kde.org/utilities/kate/commit/d134b7263b7bb0615c6ec12f5169039545f1470d