Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reset file to specified commit in SmartGit

Tags:

smartgit

How to reset file to specified commit in SmartGit? For example, I had created a commit and found that one file was wrongly changed, and I want to revert only that file.

like image 473
Feofilakt Avatar asked Sep 16 '25 19:09

Feofilakt


2 Answers

Open the Log, navigate to the commit from which you want to resurrect the file, select the file in the Files view and invoke Save As from the context menu.

like image 177
mstrap Avatar answered Sep 18 '25 10:09

mstrap


Another possibility: revert the whole commit with a wrongly changed file, but do not commit this change (select "Revert", not "Revert & Commit"). Then select all files except for the one you actually want to revert and discard the changes. Now you have this file in its original state in your working directory. You can commit it or modify it further.

like image 33
Mikhail Avatar answered Sep 18 '25 08:09

Mikhail