vscode-pull-request-github icon indicating copy to clipboard operation
vscode-pull-request-github copied to clipboard

Deal with a force-pushed PR branch

Open roblourens opened this issue 6 years ago • 2 comments

  • A PR branch is force-pushed
  • PR extension notifies me that the PR has updates
  • I click "pull"
  • Now I have to merge changes between the two versions of the branch

Currently I have to go to the command line myself to reset the branch to the upstream version which is annoying, because this is a common PR workflow. I think the typical way to do this is to fetch, then git reset --hard upstream/branch.

There should somehow be an option to reset my branch to the upstream branch. If the local commits are my own commits, we wouldn't want to lose those, so maybe there should be a separate button, or the extension can notify me after I click "pull" and ask me whether to merge or reset. Either way there should be some SCARY TEXT so I know that commits will be lost...

roblourens avatar Jan 09 '19 23:01 roblourens

Sorry to revive this but has it been addressed? The normal workflow assuming you are reviewing (instead of collaborating, for which a force push would not be common) calls for a git pull --rebase so it would be nice to have a Pull and Rebase button on the toast. But I am not sure I am doing what the extension expects me to do.

jcaamano avatar Jan 09 '25 11:01 jcaamano

This has not been addressed yet, but really it's more of a bug than a feature request as this puts you in a bad state that you can only resolve via the command line. I'll try to address in February.

alexr00 avatar Jan 16 '25 11:01 alexr00