Home » Eclipse Projects » EGit / JGit » Why are all local branches pushed by default?
Why are all local branches pushed by default? [message #716471] |
Wed, 17 August 2011 14:04 |
Dominik Schadow Messages: 15 Registered: July 2009 |
Junior Member |
|
|
When I e.g. clone a Git repository from GitHub, create a local branch, do some work (add, commit, merge), do not delete the local branch, and push my changes, my formerly local branch is pushed to my GitHub repository. Sure, the Configure push dialog tells me, 'All branches will be pushed using Push Spec "refs/head/*:refs/heads/*"'. But why is this the default? With Git on the command line, a new local branch is not pushed by default; I'll have to do that explicitly.
With EGit, all branches of all developers pushing to this repository are shared, which isn't my intention. And the only solution I'm aware of is for every developer, to update his configuration to only push from local master to remote master. This configuration work seems unnecessary to me, since the Git workflow recommends creating a branch for all changes first, and only push from master. And not all local branches can/ should be deleted right away after merging the changes.
I'm using Eclipse 3.7 with EGit 1.0.
Thanks, Dominik
[Updated on: Wed, 17 August 2011 14:05] Report message to a moderator
|
|
| |
Re: Why are all local branches pushed by default? [message #716515 is a reply to message #716493] |
Wed, 17 August 2011 15:28 |
Dominik Schadow Messages: 15 Registered: July 2009 |
Junior Member |
|
|
OK, thanks for your reply. I've compared the EGit behavior to msysGit today, not the original reference.
From a normal (hopefully ) developers' standpoint, an "only push master by default, everything else must be selected explicitly" behavior makes more sense to me. Since the normal Git workflow is to create a (short living local) branch for every change, publishing those branches by default is unnecessary. And why bother everybody with such configuration work?
Am I the first one bringing this up? Sure, you have followed the original implementation, but what's about the users out there? OK, such a poll might end up 50:50.
Regards, Dominik
|
|
| | | | | | | | | | |
Goto Forum:
Current Time: Thu Jan 09 17:50:52 GMT 2025
Powered by FUDForum. Page generated in 0.05826 seconds
|