DEV Community

Discussion on: Git TIP - Why you should not keep a local master branch ?

Collapse
 
adrinux profile image
Adrian Simmons

Lets take a distributed VCS and make it behave like like a VCS. Lets rely on third party services for workflow...Seriously, go back and read the story of why git came into being.

Collapse
 
slashgear_ profile image
Antoine Caron

That is a great and constructive comment here.

Prove me why using remote reference branch is against the distributed model ?

We tend to use a third party service for the workflow. Yeah ! But this is not the subject here.

The subject here is quite simple. If you don't work on a branch, don't checkout it locally. You already have the related remote reference branch.

Collapse
 
kimballjohnson profile image
Kimball Johnson • Edited

I appreciate this discussion very much. I've been looking for authoritative answers about this for quite some time. It makes sense to me to keep the merge targets on the repository. Then all you have on your workstation are the changes you've made to code you've fetched into a feature or bugfix local branch.
But not mentioning how the branches on the repository side are arranged makes me wonder whether this discussion is complete and confirmed!
Master is not the only, and probably not the best target for all changes on Origin, is it?
Shouldn't the target for all pull requests be the origin/development branch? And shouldn't master be the merge target for development? And then wouldn't releases be the merge target for master?
How can you explain just a part of this without providing the confirmation by drawing the whole picture?
Thanks for some kind of response!