Skip to content

Avoid resetting the branch to remote #4234

@zchenyu

Description

@zchenyu

My workflow is as follows

  1. Checkout workflow branch (usually main, but sometimes some working branch)
  2. Make local changes (uncommitted) to working branch
  3. Run peter-evans/create-pull-request@v6 with local changes
  4. Do additional stuff with local changes

However I noticed that when create-pull-request runs, it resets the working base branch:

  Resetting working base branch 'xxx'
  /usr/bin/git checkout --progress xxx --
  Switched to branch 'xxx'
  Your branch is up to date with 'origin/xxx'.
  /usr/bin/git reset --hard origin/xxx
  HEAD is now at xxxxxxxx commit

Is there a way to disable or workaround this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions