"Force-pull" button in dropdown
- Dominant language
- TypeScript
- Stars
- 21.8k
- Forks
- 10.5k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 25
Description
### The feature request
> **Note**: follow up to https://github.com/desktop/desktop/pull/15907.
There's an operation I find myself doing relatively often, which is a bit clunky. Consider this scenario:
- You're working on a branch.
- Someone (not you) force-pushes to that branch
- Your branch in GitHub Desktop is now messed up
- You can't pull, because that'll also push your invalid commits from that branch, create a merge commit and mess things up
- You can't fetch, or rather you can but it just doesn't do anything
- You have to manually delete the branch, then checkout to it again from the remote branch
### Proposed solution
It would be very nice if, whenever the remote branch is in an "invalid" state with respect to the local branch, that is, whenever it both has new commits compared to local, but local also has new commits compared to remote (in other words, whenever doing a pull would cause a merge conflicts), we'd show a "force pull" option in the new dropdown menu:

This would force the local branch to be identical to the remote, and in sync again. Conceptually, it'd be the same as:
- Deleting the local branch
- Checking out to the remote branch
- Pulling changes
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.