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 16 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).
|
Beta Was this translation helpful? Give feedback.
16 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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 push
does 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
Beta Was this translation helpful? Give feedback.
All reactions