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 force with lease to the advanced push options #2991
Conversation
a0e6d17
to
5551dc6
Compare
I really like this option to be merge into GitExtensions. To tell you my life, today is the first time I really mess the central repository at work. If GitExtensions would have the Thanks @EbenZhang (for this PR and for the others!) But is it possible to do 2 things :
|
@pmiossec Your suggestion sounds great! |
c27028b
to
adbde97
Compare
f479657
to
3ba72ae
Compare
private readonly TranslationString _useForceWithLeaseInstead = | ||
new TranslationString("Force push may overwrite other people's change. Do you want to use the safer force with lease instead?"); | ||
private readonly TranslationString _forceWithLeaseTooltips = | ||
new TranslationString("Force with lease is a safer way to force push, it ensures you don't overwrite other's work."); |
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.
Maybe "Force with lease is a safer way to force push. It ensures you only overwrite work that you have seen in your local repository."
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.
Yours sounds more accurate.
Out of curiosity, this has is ready for merge, but never happened. What's preventing this to be merged? |
I think they only want to merge bug fixes not features. Maybe we should have a branch for features. |
https://github.com/gitextensions/gitextensions/wiki/Project-Workflow On Thu, Mar 10, 2016 at 8:48 PM EbenZhang notifications@github.com wrote:
|
@EbenZhang looks like you've done everything except the last step: a screenshot :) @vbjay is that it? |
I don't like two checkboxes for force push, because of that I add it only to push popup dialog. |
Yes but because of that, it's a feature hard to discover! I only found out
the day I made a mistake.
I think, I highly prefer to show 'force-with-lease' by default instead of
'force' to prevent mistakes.
And propose force only if it fails (It could be an idea to never propose it
because I don't see where 'force' could be useful over 'force-with-lease'.
And in these exceptional cases, we could fall back to command line) .
My point of view is that 'force-with-lease' is a lot better practice than
'force' and for that, it should be put forward and be the default way to do
a "force"...
|
I agree. If they are pushing tags then alert them and get their consent to On Tue, Apr 26, 2016 at 6:23 AM Philippe Miossec notifications@github.com
|
f1bf88a
to
c6761ed
Compare
rebased on top of the latest master to solve conflicts |
Would really like to see it merged, along with left-panel. |
Is there a way to specify that the default for push in GitExtensions should be |
@SeanFeldman Are you sure you want to set |
Yep. You only want to do this when you want to force a push. It has some
safety so that you won't overwrite any commits that are in the remote but
not in your repo. It will overwrite the history for commits that already
existed. https://developer.atlassian.com/blog/2015/04/force-with-lease/
This should only be used when needed.
…On Wed, Feb 15, 2017, 4:57 PM Philippe Miossec ***@***.***> wrote:
@SeanFeldman <https://github.com/SeanFeldman> Are you sure you want to
set --force-with-lease the default option when you push?
It makes no sense for me because if you ever fetched the commits of other
developper, you could end overwriting the remote history and loose history
(which is ironic because this option was introduced with the goal to not
loose history inadvertently!)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2991 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADdhsRFaQdopCs1TowKzpIoNj26g2fLsks5rc3TTgaJpZM4GS8bq>
.
|
I think the thing still missing is from the dialog that pops up from a normal conflicting push - which offers only a force push, not force with lease iirc |
In fact the pop-up is doing a '--force-with-lease' even if it's not
displayed clearly...
|
@pmiossec what I meant is to have a single "force" option, and to be able to configure what's done by default when and if push is force. SourceTree does it that way. They allow to configure the default behavior for forced push, either a regular |
Fixes #2955