From 95030c334fb613ff5001609668b71382bcf42508 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 8 Jul 2020 09:35:25 +0800 Subject: [PATCH] Use `checkout -f` instead of `restore` to discard local changes with tracked files --- SourceGit/Git/Repository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SourceGit/Git/Repository.cs b/SourceGit/Git/Repository.cs index 983628a6..34397d7f 100644 --- a/SourceGit/Git/Repository.cs +++ b/SourceGit/Git/Repository.cs @@ -658,7 +658,7 @@ namespace SourceGit.Git { if (change.WorkTree == Change.Status.Untracked || change.WorkTree == Change.Status.Added) { RunCommand($"clean -qfd -- \"{change.Path}\"", null); } else { - RunCommand($"restore -- \"{change.Path}\"", null); + RunCommand($"checkout -f -- \"{change.Path}\"", null); } } }