Reputation: 39681
Wondering if this is a reasonable approach to using git with a small team:
That seems like a reasonable workflow to me. Now it comes time for the developers to merge all their work for a release of the app they're working on. My understanding:
So the idea is that all developers work on their own local branches, and periodically merge stuff into "dev". Only at release time does someone pull changes from "dev" into "master". So "master" always contains the last-released code.
Does that seem reasonable?
Thank you!
Upvotes: 4
Views: 2613
Reputation: 23542
This workflow would probably be fine, though it has some points that you may want to think about.
It does not reflect a common Git philosophy of having each branch represent one "feature" or "topic"-worth of work (see, for example, Junio Hamano on the purpose of branches). However, that wouldn't stop it from being a workable workflow for your team.
A popular workflow that reflects this philosophy is git flow.
Another popular workflow is the workflow that the GitHub dev team uses which directly goes against what Junio writes about merging master into feature branches, in favor presumably of keeping the mental model simpler and avoiding having to explain about rebasing to developers.
Another issue is that this workflow discourages frequent integrations. So devA and devB may diverge significantly and the developers may have to do a lot of work to merge when the time comes.
Git itself does not care so if your developers are happy, then what you propose seems workable.
Upvotes: 4
Reputation: 2311
Assuming you have more than two developers, do you want one developer to be able to pull changes from one other specific developer, but not include changes from all the other developers? If not, I don't see a need to create any developer branches at all. Everyone checks in to master on their own repository; everyone pushes to master on the origin; everyone gets all pushed changes, merged from all developers, on every pull.
As for the master vs. dev branch on the origin, you could do that; more typically though, I think, master is ongoing work, and each stable release has its own branch.
Upvotes: 2