Pushing on multirepo project defaults to all
已回答
When pushing on a multi-repo project, Pycharm's default behavior is to push empty branches on repos without any changes. This result is either a lot of clicking to deselect all the excess repos (every single time I push changes), or else a lot of empty branches which I have to delete later.
Is there a way to change the default to either a) select no branches, or b) only select branches with actual commits to push?
When the branches aren't empty, it does this nicely, only committing to branches with changes. It's just the empty branches which are an issue for me.
In the attached example, I would love for the top branch and the middle 3 branches to not default as selected.
请先登录再写评论。
Hello Shmuel Treiger
Please check whether you have "Execute branch operations on all roots" enabled under Preferences | Version Control | Git ?
It seems that you have it enabled
That solved it! Thank you so much :)
Is it possibly worth mentioning somewhere on this page?
https://www.jetbrains.com/help/pycharm/2021.2/push-dialog-mercurial-git.html
This messed with other desired behaviors, for example checking out all the branches at once :/
You can enable this feature back and then press Ctrl+A -> spacebar in Push dialog- it will deselect all branches.
>Pycharm's default behavior is to push empty branches on repos without any changes
New branch is a change, this is why you are offered to push this branch to the remote. If there would be this branch on a remote, then you wouldn't be offered to push it.
Why would you like to checkout all branches at once but not push them at once?
Super helpful! Thank you!
Working on a legacy app which has about a dozen repos, but they're all interconnected, so often times changes stretch from one repo to the next. Easiest to check out the whole project, change 3 repos, add a branch for each, and push commits for just those branches.
Ruslan Kuleshov The OP stated that in his question.
These don't seem like changes to me either. My team lead does not care if I use multi-branch feature, and will not like empty branches. Me neither
Do we have a solution yet? I think we just need a setting: do not push branches without commits. Or, in this case only commits should be considered as changes
Hi Victor,
Please feel free to open this idea on our YouTrack as feature request.
https://youtrack.jetbrains.com/