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
Add support for --force-if-includes
to force push more safely
#187932
Conversation
--force-if-includes
to force push --force-if-includes
to force push more safely
@lszomoru Could you assign another person if you're too busy to review my PR? |
@lszomoru Only |
2e3fce1
to
0e33233
Compare
@lszomoru A month is passed. If you don't want to review my change, bring someone else as soon as possible. |
b1c8f09
to
48551d1
Compare
@joaomoreno @alexr00 @bpasero |
@tats-u Please be patient. |
@joaomoreno When on earth can I get a review from one of you? |
48551d1
to
20afeb0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please address my comments? Thank you!
b1e4dfd
to
2acb0b3
Compare
@lszomoru I finished the modification. Could you review my changes again? |
@tats-u, I have pushed a commit to make some minor improvements. |
…osoft#187932) * Add support for `--force-if-includes` to force push * Change force push failed error message * Separate force push (no with lease) failed error message * Switch to `"markdownDescription"` * Add Git version requirement for config description * Improve error message when safer force push is rejected * Eliminate the option's effect if Git is too old * Minor improvements to community contribution --------- Co-authored-by: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com>
Fixes #144635
Fixes #190356
--force-if-includes
makes the force push even safer if used with--force-with-lease
.This option is available since Git 2.30.0. (Released on Dec 2020. The version in Ubuntu 22.04 is newer.)
man git-push
says:The release note says:
git push --force-with-lease --force-if-includes
is so long that we hesitate to type.VS Code asks us if it turns "Git: Autofetch" on by a toast:
https://ruky.me/2021/02/21/dont-allow-vscode-to-auto-fetch-from-repos/
Innocent Git newbies will press "Yes" and get ready for overwriting others' remote commits by innocent force push incompletely taught with rebase by Git "expert" bad at teaching.
This PR is created based on #53286.