Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] making push force more handy

On Tue, Jun 18, 2013 at 3:59 PM, Robin Stocker <robin@xxxxxxxxx> wrote:
> Hi Matthias, Hi Tomasz
>
> Thanks for your feedback!
>
> On 06/17/2013 08:08 AM, Matthias Sohn wrote:
>
>
>
> On Fri, Jun 14, 2013 at 3:38 PM, André Dietisheim <
> adietish@xxxxxxxxxx > wrote:
>
>
> Hi
>
> I'm currently looking into improve EGit here and there usability-wise
> (and in my daily job). We have master repos on github and each dev
> has its personal fork. We all work on topics-branches. Once the code
> is ready we rebase (or amend beforehad) and file a pull-request
> which then gets merged into the master repo.
> The git staging view is just awesome, it allows commiting and pushing
> to my github fork in a single (button) click. That's even easier
> than on the cmd-line. Unfortunately when I amend, I have to push
> force to my fork which is not as handy.
>
> * The git-staging view doesn't offer a force switch which could come
> very handy but could also be very dangerous. What are your thoughts?
>
> yes, it's dangerous, we could add a force switch but it's default
> should be always off.
> Maybe we should only offer it after fast forward failed.
>
> Yes, good idea. I put 2 suggestions into my blog here:
> https://community.jboss.org/en/tools/blog/2013/06/18/how-to-use-eclipse-egit-with-github-in-jboss-tools
> * a checkbox below the warning "your amended commit was already
> pushed..." in Git Staging View

-1 to this suggestion. I think this would cause a lot of grief
when unexperienced users just force-push without knowing what
commits they are effectively discarding on the remote.

> * a dialog that comes up when push fails non-fast-forward

+1. A dialog that would offer additional information would make this
really usable:


+---------------------------------------------------------------+
| The push was rejected by the server because it would discard  |
| existing commits. You can try to force the push if you are    |
| sure that you want to replace the existing commits with the   |
| new ones.                                                     |
|                                                               |
| Commits to replace:                                           |
| # deadbeef: Implement foo  (Au Thor)                          |
| # 1238abc8: Fix problem bar  (Au Thor)                        |
|                                                               |
| Replaced by:                                                  |
| # abc12345: Implement foo  (Au Thor)                          |
| # def67890: Fix problem bar  (Au Thor)                        |
|                                                               |
|                                      [Cancel]   [Force Push]  |
+---------------------------------------------------------------+

I agree this is better, forget my previous vote for the other solution
 
This way the user would notice if the above contained commits
that are not from them, and a e.g. rebase is necessary. And maybe
the dialog should not be automatic but should be explicitly opened
from the push results dialog. Otherwise it would also appear
directly when just a normal rebase/merge is in order. Or we could
change the text and also offer rebase/merge as buttons there.

that's a great idea, we should also provide rebase and merge action
to fix a failed push

--
Matthias

Back to the top