mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
Use checkout -f
instead of restore
to discard local changes with tracked files
This commit is contained in:
parent
270b07684c
commit
95030c334f
1 changed files with 1 additions and 1 deletions
|
@ -658,7 +658,7 @@ namespace SourceGit.Git {
|
||||||
if (change.WorkTree == Change.Status.Untracked || change.WorkTree == Change.Status.Added) {
|
if (change.WorkTree == Change.Status.Untracked || change.WorkTree == Change.Status.Added) {
|
||||||
RunCommand($"clean -qfd -- \"{change.Path}\"", null);
|
RunCommand($"clean -qfd -- \"{change.Path}\"", null);
|
||||||
} else {
|
} else {
|
||||||
RunCommand($"restore -- \"{change.Path}\"", null);
|
RunCommand($"checkout -f -- \"{change.Path}\"", null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue