Community
Participate
Working Groups
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.
Created attachment 232582 [details] balsamiq mockup xml
Created attachment 232583 [details] balsamiq mockup picture
Any reason why this is limited to the staging view ? Why not also on git push from the context menu or repository explorer ?
(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.
(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 :).
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).
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?
Snippets for Toolitem with menu https://git.eclipse.org/c/platform/eclipse.platform.swt.git/tree/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet67.java
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
New Gerrit change created: https://git.eclipse.org/r/c/egit/egit/+/192232
Gerrit change https://git.eclipse.org/r/c/egit/egit/+/192232 was merged to [master]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=055028ebae89758114bb8e7d8d53a58539ed9a8d