desktop / desktop/desktop

"Force-pull" button in dropdown

Open
#16,673 2 comments 13 reactions 0 assignees View on GitHub
enhancement not-planned
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:

![](https://github.com/desktop/desktop/assets/10199417/7b54f377-fde1-49ce-879d-2bad0454302e)

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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.