diff --git a/main.go b/main.go index 8991570..ea80eb8 100644 --- a/main.go +++ b/main.go @@ -106,15 +106,6 @@ func run(c config) error { return xerrors.Errorf("unable to get a worktree based on the given fs: %w", err) } - s, err := w.Status() - if err != nil { - return xerrors.Errorf("unable to get the working tree status: %w", err) - } - - if !s.IsClean() { - return xerrors.New("the repository is dirty: commit all changes before running 'cob'") - } - err = w.Reset(&git.ResetOptions{Commit: *prev, Mode: git.HardReset}) if err != nil { return xerrors.Errorf("failed to reset the worktree to a previous commit: %w", err)