Repository navigation
Add dwim push that uses upstream vs pushRemote or block upstream push if pushRemote exists #4707
darkfeline
started this conversation in
Ideas
Replies: 1 comment 17 replies
I like that idea, and on my end I'd probably enable confirmations (though for topic branches, I typically configure my upstream to a local branch, so there's no real risk of an accidental push).
|
17 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Currently Magit requires the user to explicitly choose whether to push to upstream (
P u) or pushRemote (P p). There should be a single dwim command that intelligently picks between the two like howgit pushdoes it.The reason this is bad is because the user may have muscle memory from pushing a branch that has no pushRemote, then accidentally pushing to upstream on a branch with pushRemote set, where pushing to upstream is a bad idea (like pushing a WIP feature branch to master).
Alternatively, there should be some way to prevent the user from accidentally pushing to upstream when pushRemote is set, like requiring a yes/no prompt.
Example for the latter: darkfeline@1e27996
All reactions