Bug 411219 - Should be able to push force from Git Staging view
Summary: Should be able to push force from Git Staging view
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 enhancement with 1 vote (vote)
Target Milestone: 6.2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 388913
Blocks:
  Show dependency tree
 
Reported: 2013-06-20 05:44 EDT by Andre Dietisheim CLA
Modified: 2022-03-27 14:36 EDT (History)
11 users (show)

See Also:


Attachments
balsamiq mockup xml (2.96 KB, text/xml)
2013-06-20 05:46 EDT, Andre Dietisheim CLA
no flags Details
balsamiq mockup picture (37.91 KB, image/png)
2013-06-20 05:48 EDT, Andre Dietisheim CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andre Dietisheim CLA 2013-06-20 05:44:53 EDT
Git Staging view offers the nice capability to "Commit and Push" since https://bugs.eclipse.org/bugs/show_bug.cgi?id=388913. 
In Git Staging view you can also amend but pushing will then fail (non-fast-forward). To then push force you have to use the fully fledged push action which is cumbersome. We should allow users to push force from the Git Staging view.
Comment 1 Andre Dietisheim CLA 2013-06-20 05:46:24 EDT
Created attachment 232582 [details]
balsamiq mockup xml
Comment 2 Andre Dietisheim CLA 2013-06-20 05:48:02 EDT
Created attachment 232583 [details]
balsamiq mockup picture
Comment 3 Max Rydahl Andersen CLA 2013-06-24 06:43:49 EDT
Any reason why this is limited to the staging view ?

Why not also on git push from the context menu or repository explorer ?
Comment 4 Andre Dietisheim CLA 2013-06-25 06:27:03 EDT
(In reply to comment #3)
> Any reason why this is limited to the staging view ?
> 
> Why not also on git push from the context menu or repository explorer ?

The bugzilla was primarily targeting the git staging view, but the fix that's suggested will afaik change how every (non-force) push gets reported, it's not limited to git staging view.
Comment 5 Robin Stocker CLA 2013-06-28 12:12:55 EDT
(In reply to comment #2)
> Created attachment 232583 [details]
> balsamiq mockup picture

On the mailing list we discussed that we should also offer merge and rebase. In light of this, this has to be changed a bit.

I'm also wondering whether we should require one more confirmation in case of force push. We really don't want any accidental force pushes.

The best user experience would probably be to make this into a wizard. So when the user chooses "Merge...", we try to merge and then on the next page, offer a "Push" button if successful. In case of conflicts, we have to abort for the user to be able to resolve them. The same for rebase.

What do you think? Btw, I'm sorry that I'm making this bigger than it was at the start :).
Comment 6 John Hendrikx CLA 2016-11-07 05:30:18 EST
I think this has been delayed long enough.  Please make a drop-down style Push button that has "Force Push" as the 2nd option (see IntelliJ).
Comment 7 Christoph Laeubrich CLA 2022-01-02 02:16:14 EST
Any progress on this? JGit currently also shows a warning that a branch was already published, maybe this could be used as a trigger to show another button?

As an alternative, I could think of that if the push fails in the push-dialog it offers to try a force-push instead?
Comment 9 Gunnar Wagenknecht CLA 2022-03-23 03:27:55 EDT
Note that it was possible to force push in EGit from the Staging View by setting a refspec that would force push. This has been recently regressed in EGit.
https://www.eclipse.org/lists/egit-dev/msg04815.html
Comment 10 Eclipse Genie CLA 2022-03-24 19:44:13 EDT
New Gerrit change created: https://git.eclipse.org/r/c/egit/egit/+/192232