Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow force push with lease option in the Git Staging view (--force-with-lease) #33

Open
fapdash opened this issue May 16, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@fapdash
Copy link
Contributor

fapdash commented May 16, 2024

Description

I'd like to have the option to choose force push with lease in the drop down menu of the Git Staging view:

2024-05-16_10-23

Motivation

From SA:

--force-with-lease is a safer option that will not overwrite any work on the remote branch if more commits were added to the remote branch (by another team-member or coworker or what have you). It ensures you do not overwrite someone elses work by force pushing.

https://stackoverflow.com/a/52823955

Since the chosen option isn't always visible I often end up having force push on without thinking about it and force push with lease would stop me from overwriting changes from my collaborators.

Alternatives considered

Make it always visible that the force push option is turned on, might be a viable option as well. If it's feasible in the UI that might be a worthwhile change anyways.

Additional context

No response

@fapdash fapdash added the enhancement New feature or request label May 16, 2024
@fapdash fapdash changed the title Allow force push with lease (--force-push-with-lease) Allow force push with lease (--force-with-lease) May 16, 2024
@fapdash fapdash changed the title Allow force push with lease (--force-with-lease) Allow force push with lease option in the Git Staging view (--force-with-lease) May 16, 2024
@tomaswolf
Copy link
Contributor

Regarding the "alternatives considered": https://github.com/eclipse-egit/egit/wiki/New-and-Noteworthy-6.2#git-staging-view tells: If the "Force Push" option is active, the button's icon shows a little green plus sign top-right.

This is visible in your screenshot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants