score:0

Accepted answer

maybe you should advise developers to create feature-branches not from the remote-tracking branch (e.g. origin/master), but from the local one (master). this way, egit will not set up any remote tracking by default.

if you then decide to publish the branch for the first time, it should be possible to set up the remote tracking (the equivalent of git push --set-upstream) after bug 378960 is implemented.

score:1

egit will, by default, take the upstream branch for the merge parameter when creating a branch from a remote one.
that means, if you want to enforce the policy which is to push to remote/master only from a local branch master, you can try and enforce it locally.

check if egit respects a git config push.default current for pushing only the current branch to an upstream branch with the same name (which might actually become the default policy after git1.7.10).
however, that has the issue of making sure every developer has that policy active in his/her repo.

(i don't think you can enforce it at the "central" repo one, where you could add a server-side hook like an update hook: that script take the name of the branch being updated (ie here 'master', not the name of the branch in the downstream repo, ie here 'feature1')


note: bug 378960 has been marked as resolved (february 2014) in egit 3.2:

push branch / initial push wizard simplifies pushing a branch and also allows upstream configuration for new branches created by the push operation:

https://wiki.eclipse.org/images/6/6f/egit-3.2-pushbranchwizard.png


Related Query

More Query from same tag