Consider Switching to Git Flow
See original GitHub issueSummary
The Duality repo currently uses a custom setup for its branches and workflow. To make it easier for new contributors to understand the process, consider adopting the widely used git flow model, or a variant of it.
Analysis
- This can be done entirely by renaming branches and updating docs in the wiki.
- Renaming a branch should be no big deal and not a breaking change for forked repos.
- Branch off from the original branch using the new name.
- Push the new branch to the repo.
- Delete the old branch on the repo.
- Fetch + Prune the local clone of the repo.
- Branches to be renamed:
master
becomesdevelop
release
becomesmaster
develop-3.0
becomesrelease/3.0
1.x
becomesarchive/1.x
- Any ongoing feature branch becomes
feature/[3.0/]name-of-whatever
- Update the docs:
- Development Cycle
- Branch Descriptions
- Make sure there’s a link it in the appropriate
.github
docs
- Deviations from standard git flow:
- Using slashes for feature and release branch prefixes instead of hyphens.
- Allow to directly merge smaller changes directly from
develop
tomaster
, except for really big stuff. - Using archive branches for old major versions.
- Whether or not to switch to the new model is to be discussed.
- Is there really a need to do this?
- Does it make the development process easier or harder?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Gitflow Workflow | Atlassian Git Tutorial
The git flow init command is an extension of the default git init command and doesn't change anything in your repository other than...
Read more >Consider switching to trunk based development from git flow
The problem with it is how we tag versions: when there is no support branches, everything merged into main and the commit tagged,;...
Read more >Don't Fear the Repo: Enhanced Git Flow Explained
Enter “Enhanced Git Flow” Note: Up until the first public release of a product, it absolutely makes sense to commit all changes directly...
Read more >How to use Git Flow | Learn Git
To start using a Git flow workflow in GitKraken Client, perform the following steps: Navigate to Preferences in the top toolbars; In the...
Read more >Please stop recommending Git Flow!
Gitflow violates the “Short-lived” branches rule. In git, the number of merge conflicts with people committing to a branch will increase with ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There are quite a few adaptations to GitFlow that seem to be inline with the goals you shared.
Maintaining multiple major versions is definitely an option, just not often done. Here is one such discussion.
2 years later and I would suggest its better to look at something like githubflow. Having a separate develop and master doesn’t give you any advantages but can cause some pesky merge conflicts. 2 long lived branches that represent the same history is bound to go wrong.
Releasing a new version should be done by creating a new tag. No need for complicated merges and this also makes it easy to see which versions where deployed in the past.
To support older versions we should have a separate branch for each older version we support. These branches are basically a master branch for their respective version. Bringing changes from a newer version to a old version should be done with cherrypicks.