Skip to content

Handle git failure to run checkout with a better message #1009

@shcheklein

Description

@shcheklein

When we run a command that is running checkout internally, we could get:

Unexpected error: Cmd('git') failed due to: exit code(1)
  cmdline: git checkout bigrams
  stderr: 'error: Your local changes to the following files would be overwritten by checkout:
    auc.metric
    auc.metric.dvc
    featurization.py
    matrix.pkl.dvc
    model.pkl.dvc
Please commit your changes or stash them before you switch branches.
Aborting'

We should improve the message.

Ideally, we should find a way to traverse git's object graph w/o actual checkouts.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions