Skip to content

Allow force-pushing from menu every time a branch has diverged - #15521

Merged
sergiou87 merged 2 commits into
developmentfrom
let-me-force-push
Oct 25, 2022
Merged

sergiou87 merged 2 commits into
developmentfrom
let-me-force-push

Conversation

@sergiou87

Copy link
Copy Markdown
Member

Closes #15211

Description

This PR supersedes #15494

Changes the logic of the Force push item under the Repository menu, to always show up when the current branch has diverged from its upstream. The rest of places where we usually suggest to force-push will keep the existing behavior: they will only show Force push when GitHub Desktop knows the branch diverged after the user performed an operation that is usually followed by a force-push (like a rebase or amending an already pushed commit).

Screenshots

Screen.Recording.2022-10-20.at.18.20.59.mov

Release notes

Notes: [Added] Enable menu option to Force-push branches that have diverged

Comment thread app/src/lib/stores/app-store.ts Resolved
tidy-dev
tidy-dev previously approved these changes Oct 25, 2022

@tidy-dev tidy-dev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✨ Works great!

@sergiou87
sergiou87 merged commit 87cad47 into development Oct 25, 2022
@sergiou87
sergiou87 deleted the let-me-force-push branch October 25, 2022 13:30
@say25

say25 commented Oct 27, 2022

Copy link
Copy Markdown
Member

Something that makes me a little nervous about this is that the shortcut seems to be the same when doing a force push

@sergiou87

Copy link
Copy Markdown
Member Author

That's a good point. It was already the shortcut of force-push when it was available before (after a rebase/squash/reorder/cherry-pick). If users are concerned about it, I guess they always have the prompt to confirm the action? 🤔

@emt420769

Copy link
Copy Markdown

Contribution

@Mdbabul41 Mdbabul41 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

app/src/lib/rebase.ts

@Mdbabul41

This comment was marked as off-topic.

@Mdbabul41

This comment was marked as off-topic.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a "Force Push" menu item

5 participants