Block possibility of pushing on master branch from IDE.

Answered

Hay,

Sometimes, when I push new feature branch I forget for change for desired branch and I push on master.

I know that I can't block possibility of pushing on master from repo site, but I need to have there this privilages for merge requesting.

And i was wondering If there is some way to block pushing on master from IntellIJ?

Best regards.

0
4 comments

No, it is possible to It is only possible to block force push to specified branches.

The use case is not clear though. Don't you need to push to master ever? Why?

Also, when you push a branch that has no tracked one, IDE should offer you to create a new remote branch with the same name as the local one. Or do you push to a new branch while being on master locally?

0

When I create new branch from master branch for example "ex40", then make some changes on that new branch and want to push changes IDE automatically want to push this changes from "ex40" to master. Instead of offering me creating new branch on the master (I need to do this manually). And sometime I forget to change from master to newly created branch to push and instantly push changes to master.  

0

This is most likely because you use Checkout as new local branch, which sets the new branch to track the one it was checked out from. Do you use the Checkout as new local branch?

If you don't want a tracked branch to be set, just use New branch action, and it will offer to create a new branch on the remote by default.

0

You are right. I need to change flow of creating new branch. Thank you :)

0

Please sign in to leave a comment.