Skip to content

submit --force doesn't make all pushes force-pushes #272

Description

@swolchok

Through some sort of github user error (probably mine), a bunch of extra commits got added to one of my stacked PRs recently. I couldn't rebase and rerun ghstack --direct because the branches were out of sync. I was baffled as to why --force didn't resolve my issue, but it looks like it does something different? If this is an oversight, it could be fixed by adding force=self.force on

self._git_push(base_push_branches)
and
self._git_push(push_branches)
.

Activity

  1. ezyang commented on Mar 13, 2025

    @ezyang
    Owner

    Force does something different. We could also add an option to force Git pushes (or roll it into force)

  2. iwahbe commented on Dec 20, 2025

    @iwahbe

    Is this the appropriate issue to ask that that ghstack submit force pushes instead of adding an "Update" commit, or should I open a new issue for that?

  3. ezyang commented on Dec 30, 2025

    @ezyang
    Owner

    @iwahbe you're welcome to open issue, but not force pushing is an important part of ghstack's value proposition (as force pushing destroys preexisting PR comments in GitHub's UI)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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