atymic / twitter

Twitter API for Laravel 5.5+, 6.x, 7.x & 8.x
https://atymic.dev
MIT License
922 stars 290 forks source link

Use git-flow branching model #278

Closed reliq closed 5 years ago

reliq commented 5 years ago

I'd like us to use the git-flow branching model going forward as it offers more verbose organization and has proven to be a solid branching strategy.

⚠️ Workflow Changes

With Git Flow the following branching behaviours are commonly observed:

Branch Purpose
develop holds current development (dev. master) - commits for next release
master current state in production (ideally only tagged commits) from a release/x branch are merged in
release/my-version release branch with changes for version my-version
feature/my-feature feature branch surrounding development of my-feature
hotfix/my-bug branch surrounding the fix of my-bug

I believe this model would work wonders for keeping this package organized going forward.

N.B. There is a command line tool to aid us in branch creation, releases, etc.

References:


Thoughts?

atymic commented 5 years ago

Hey @reliq

I think keeping the branches organised is a great idea, but I'm not sure following git flow is the best way to do it. In my understanding, git flow is best used for projects, not libraries.

In the example workflow you posted, features/bugfixes are PRs (which are not branches on this repo). As a result, they branch names don't really matter.

In terms of develop/master/release, having a separate branch for every release doesn't really make sense unless we need to go back and change it in the future. (For example, we'd have a 2.x branch and a 3.x branch, to allow backpatching fixes).

I generally look to the community in cases like this, and from what i've seen in the wild there's few who use git flow for libraries.

Let me know your thoughts :)

You will probably not gain from using GitFLow in a library. That is just used by other software. Where a release is just a process of packaging an artifact an making it available for other software to use. You can probably just release a new version if something needs to be fixed later, and the users of the software can just keep using an older version until things are worked out.

reliq commented 5 years ago

Fine by me. Wanted to hear your thoughts and what you've said makes sense.

Thank you.

atymic commented 5 years ago

No worries :)

Somewhat related, I would like to adopt conventional commits. https://www.conventionalcommits.org/en/v1.0.0/

I also need to write up a issue template and PR checklist :)

reliq commented 5 years ago

Sounds good. Will look at how conventional commits work