Tech talk S01.e02 (May 19, 2016)
We were supposed to cancel this session but in the end our inner motivation won. We’d rather sit down in the coffee store in as little as a few minutes than quitting the weekly routine. Stick with the routine, folks.
Git flow the non-suck way
I’ve been struggling with Git Flow. And yeah, I’ve been through so many good and bad articles on the workflow with Git but I couldn’t find one that fits our development process. Or, that was the problem of our own development process.
Wanted to explain what I have been doing in our project but fortunately I found this article http://blogpro.toutantic.net/2012/01/02/another-git-branching-model/ which is the exact what I’m doing.
Rebase asap
( Hieu Pham )
Depends on type or size of projects, there would be many git flows to fit with. Here are just 2 examples of git flow that could be applied easily:
- Branching off on purpose
- Branching off on features
Branching off on purpose
This flow is pretty simple, you just create new branch depends on your general idea :
- master — Production branch, only runnable-deployable code is allowed to push to this branch.
- dev or development — Its name says it all. Your development code. You & your teammates will work on this branch primarily.
The flow would be like :
- Work on dev branch
- After finished your work, pull from remote to merge with other works — if any (and resolve conflicts — if any)
- Push your code to remote/dev branch (often origin/dev or upstream/dev)
- Create a pull request and tell someone review it.
- After being reviewed & tested carefully, merge your updates to master branch
Pros & Cons of this flow :
- Pros :
— Simple, direct
— Easy to merge, easy to pull-request, easy to review
— Fit will small projects, only 1–2 developers get involved
- Cons:
— If there were many works have been done during you were working. It would causes many conflicts to your updates
— Since everybody is allowed to push to Dev branch, then it could be messed up.
— Doesn’t fit with big projects, big team, huge features list need to be done in same time …
Branching off on feature
This might be a little bit complex. But this is the most useful flow which could apply to all type of projects on all purposes
(Chu Quang Tú )