Closed MircoBabin closed 1 year ago
How can a 'push' create a merge commit? Only a 'pull' could do that.
I don't know when a merge commit exactly is created. Perhaps it's the server part at Bitbucket, I don't know.
I just want to get rid of the "push" button.
If "the server part at Bitbucket" is what creates an unwanted merge when receiving a non-fast-forward push, then I am not sure how your push-fast-forward-only strategy even works "outside of Git Gui".
I am a total newbie when it comes to git-gui (never used it for any serious work), but looking at its code, unless you allow "Force", it shouldn't allow pushing something that is not fast-forward (which hopefully would avoid letting the server side create a merge commit).
@gitster:
1) I have specifically created a side project GitNoob https://github.com/MircoBabin/GitNoob to ensure only fast-forward-push.
2) My request is about hiding the push button (only the button on the main screen). Not about changing/exploring/fixing git push or something like that.
Because I'm using GitNoob I never want to use the PUSH button again. But as said, the PUSH button is so close to the COMMIT button that accidentes happen. It is to easy to click the wrong button, they are only 10 pixels or so away from each other.
I usually just press Ctrl+Enter to commit and don't use the buttons at all, so I also can't miss it. ;-)
You could clone the git gui
repo and make the [suggestable] changes yourself, and then, once proven as satisfactory, use GitHub's gui to provide a PR.
The git-gui already uses the git config system with it's own private keys, so you could add an extra key, possibly for the GitNoob system, that would allow git-gui to show/not show the Push button based on the extra git-gui flag, which could be set from GitNoob.. ? It is open source.
That said, the opinionated Git and the opinionated GitNoob may have different mental models that can't be resolved that easily. A PR would help clarify.
@PhilipOakley:
I created a pull request, see https://github.com/prati0100/git-gui/pull/74
For what it's worth, I've never used the push button, I don't need it, and I've merged your PR in my personal git-gui
fork :)
I'm closing this. It's been a year. No results or useful comments. This was a waste of my time and energy.
Question/request
Is it possible to remove/hide/disable the push button via a commandline parameter ? And if not currently possible, could such functionality please be added ?
It's ok to have the "push" functionality in the menu. Because that requires extra actions to be reached. My main concern is only the "push" button because it's so prominent in the picture.
Why
I never want to use this button anymore. Because this "push" can create a merge commit if necessary. And I want linear git history.
I'm using the rebase + merge-fast-forward-only + push-fast-forward-only strategy outside of Git Gui. But i'm using Git Gui for creating commits.
Problem
Because the "push" button is so close to the "commit" button, I frequently find myself pushing the wrong button. Of course the "push" button displays a window asking for confirmation. And I can cancel that then. But on a bad day in a hurry, I don't read and just push go ahead. Resulting in the merge commit I did not want.
Screenshot
P.S. I'm using Microsoft Windows.