Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add support for force push and force-with-lease #53286
This PR introduces support for force pushing with and without lease.
Force pushing is disabled by default, and if enabled, it will use force-with-lease unless set otherwise. This is to deter people that aren't aware of the consequences that the action might have. There is also a confirmation dialog which can be configured to never show if the user wants. Separate command variants with force are added to differentiate them from regular pushing, but those will not show if the option is not set to allow it.
Made this PR before realising the work made in #53170 but I think this provides enough additional value to be considered over that one.
Please be aware that English is not my primary language, so even if I made my best effort to avoid typos, I might have missed some.
This fixes #53045
referenced this pull request
Jun 29, 2018
@qkdreyer unfortunately, the command is only available through the command palette as it was considered a 'dangerous' or 'advanced' operation. I'll create an additional PR to get the option added there and let the maintainers decide wether or not it should appear there.
@nesukun Nice PR! I just saw this in the release notes.
I wanted to point out that there might be a couple ways to avoid making a mistake for the GUI users.