enhance: use restore instead of reset to discard changes (#76)

This commit is contained in:
leo 2024-04-17 20:05:40 +08:00
parent 60a4d21ce7
commit 8378f018b1
2 changed files with 10 additions and 3 deletions

View file

@ -5,6 +5,13 @@ namespace SourceGit.Commands
{
public class Restore : Command
{
public Restore(string repo)
{
WorkingDirectory = repo;
Context = repo;
Args = "restore . --source=HEAD --staged --worktree --recurse-submodules";
}
public Restore(string repo, List<string> files, string extra)
{
WorkingDirectory = repo;