Skip to content

Add a --force flag to enable git-style forced update of repos #3630

@bthorsted

Description

@bthorsted

Describe the issue

Sometimes, when doing diagnostics for issues reported by our business units, we add print statements or display commands to a notebook in a git folder and then forget to remove it. When we next try to deploy updates from the source repository, the pipeline will fail because of merge conflicts. It would be nice to have a way to simply force the update command to overwrite any such conflicts.

Steps to reproduce the behavior

Please list the steps required to reproduce the issue, for example:

  1. make an edit to a notebook in a git folder
  2. make another edit in the source repository
  3. run databricks repos update REPO_ID_OR_PATH --branch string on the git folder
  4. see the error response

Desired Behavior

databricks repos update REPO_ID_OR_PATH --branch string --force should force pull changes from the source repository

Actual Behavior

databricks repos update REPO_ID_OR_PATH --branch string will always fail if the target git folder contains uncommited changes

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLICLI related issuesStale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions