the best git flow I used is mixing rebase and merge on protected branches (master + release branches).it is quite simple:
you update your branch using rebase pull is defaulted to rebase and to update your branch from another branch you rebase it.
to deliver your work you merge (--no-ff) your branch to the corresponding protected branch after you rebased it from the target branch.
I implemented this flow in my company and it is prefect for us.
it allow you to have a clean and readable history with trace of deliveries (start of branch and it's delivery) that standard rebasing flow doesn't allow.
after I rolled it out in the company I discovered that the only got server allowing to enforce this flow is gitlab. they called it semi linear history.
after that I discovered that I am not the only one to use it.
look at it for more details:
fangpenlin.com/posts/2013/09/30/ke...
when you take update via rebase and merge to incorporate you changes is that you are always playing your changes onto others branches and never incorporate others changes into yours (default pull using merge or merge from master or release branches onto yours to update it)
merging to deliver using --no-ff ensure you can follow the delivered work on master (or any release branch) using log --first-parent and prevent parent inversion because of fast forwards...
btw in the link I provided they suggest to push -f to update your remote branch after rebasing. I think that --force-with-lease is safer (in 2013 the option wasn't available)
At my previous job, we had this discussion as well, and the chosen branching model was Release Flow, as used by Microsoft. It has release branches and feature branches, optionally uses rebasing, and no merges. Main distinguishing feature is that hotfixes are committed to master and then elevated/cherry picked to the feature branch.
Our reasoning was as follows:
We still wanted release branches, as they can provide extra stability (for example performing extra tests manually). This could later be changed to better suit continuous integration, but stability was an important factor.
We want to enforce that a fix that lands in a release branch also lands in any following release branches (it had happened before that a release branch containing a hotfix wasn't merged back into master, as can possible happen with flows like Trunk Based Development and OneFlow).
Git Flow - это проверенная классика и простая концепция. А потом если менять, то уж на GitLab Flow, где применяется усложнение в виде дополнительной стабилизации в pre-prod ветке.
Идея, что в develop ветке лежит самый актуальный код для разработки - очевидная и больше соответствует тем подходам в разработке, которые применяются до какого-либо флоу, что облегчает переход на неё с других CVS (Subversion, TFS), где логика поддержки релизов похожа.
Там есть ссылки на плагины gitflow для IDE (Visual Studio Code, JetBrains IntelliJ IDEA, Atlassian SourceTree) и сравнение с GitHub Flow и GitLab Flow.
I don't think I'm following: "the differences are miniscule" but when "the importance is communication" it "leads to only one type of flow." The flow you suggest is completely different from several of the listed flows, so they don't seem to be "miniscule" differences and it seems like teams have settled on completely alternate approaches in their attempt to communicate. Help me understand what I'm missing.
(sorry more ramblings) If you don't rebase your working/feature branch, you don't care about communication (or your development is much more organized then mine).
If you stand up long standing branches, you must have large contribution teams with frequent support for your various releases, otherwise you're solving for a problem you don't have.
In the article it states that git flow doesn't use rebase, if you do no buddy will know. This thought that you can force someone to not do rebase is rediculous, but you can clearly enforce needing to rebase.
I was once on the camp that it didn't matter, rebase or merge, git will figure it out and combine changes. But I ended up in quality assurance and being able to clearly define what is change and why for each line of code is critical to a good review and understanding.
I take shortcuts, but if quality really is important, better orginizing or even eliminating the last 25 commits is worth it.
My senior collegue :
Git/Hg flow is the worst, but if not flow then what?!
We brainstormed, gave a bunch of other "flows" and came to the conclusion that git/hg flow is indeed the worst, and we still are gonna use it...
Hey! I'm Dan!
I have been coding professionally for over 10 years and have had an interest in cybersecurity for equally as long!
I love learning new stuff and helping others
Location
Brighton / London, UK
Education
Edinburgh Napier (Postgrad Cert Advanced Security & Digital Forensics)
I dont have any experience with git flow. I have plan to use it but need more knowledge before implement to my repository. Your article give me new information that there are some git flow.
We're a place where coders share, stay up-to-date and grow their careers.
the best git flow I used is mixing rebase and merge on protected branches (master + release branches).it is quite simple:
2 another important points
btw in the link I provided they suggest to push -f to update your remote branch after rebasing. I think that --force-with-lease is safer (in 2013 the option wasn't available)
This also sounds like what we do at my company
Totally agree - there are tradeoffs with each, and it's really up to you and your team to figure out what is best for your codebase.
Also: I didn't realize there were so many named git worksflows! 🤣 Thanks for the roundup - I have some reading to do on some of those :)
At my previous job, we had this discussion as well, and the chosen branching model was Release Flow, as used by Microsoft. It has release branches and feature branches, optionally uses rebasing, and no merges. Main distinguishing feature is that hotfixes are committed to master and then elevated/cherry picked to the feature branch.
Our reasoning was as follows:
Hope this gives some more insight!
Git Flow - это проверенная классика и простая концепция. А потом если менять, то уж на GitLab Flow, где применяется усложнение в виде дополнительной стабилизации в pre-prod ветке.
Идея, что в develop ветке лежит самый актуальный код для разработки - очевидная и больше соответствует тем подходам в разработке, которые применяются до какого-либо флоу, что облегчает переход на неё с других CVS (Subversion, TFS), где логика поддержки релизов похожа.
Если начинаете внедрять методологию Git Flow - рекомендую презентацию на русском языке: medium.com/ruopsdev/git-flow-prese...
Там есть ссылки на плагины gitflow для IDE (Visual Studio Code, JetBrains IntelliJ IDEA, Atlassian SourceTree) и сравнение с GitHub Flow и GitLab Flow.
In my view the differences are miniscule, and the importance is communication.
Git is a Communication tool
Jesse Phillips ・ Dec 12 '18 ・ 2 min read
This basically leads to only one type of flow.
The specifics about release and patching comes from a need to update a specific commit. That specific commit can be tracked in many ways.
I don't think I'm following: "the differences are miniscule" but when "the importance is communication" it "leads to only one type of flow." The flow you suggest is completely different from several of the listed flows, so they don't seem to be "miniscule" differences and it seems like teams have settled on completely alternate approaches in their attempt to communicate. Help me understand what I'm missing.
(sorry more ramblings) If you don't rebase your working/feature branch, you don't care about communication (or your development is much more organized then mine).
If you stand up long standing branches, you must have large contribution teams with frequent support for your various releases, otherwise you're solving for a problem you don't have.
In the article it states that git flow doesn't use rebase, if you do no buddy will know. This thought that you can force someone to not do rebase is rediculous, but you can clearly enforce needing to rebase.
I was once on the camp that it didn't matter, rebase or merge, git will figure it out and combine changes. But I ended up in quality assurance and being able to clearly define what is change and why for each line of code is critical to a good review and understanding.
I take shortcuts, but if quality really is important, better orginizing or even eliminating the last 25 commits is worth it.
quoteinvestigator.com/2012/04/28/s...
My senior collegue :
Git/Hg flow is the worst, but if not flow then what?!
We brainstormed, gave a bunch of other "flows" and came to the conclusion that git/hg flow is indeed the worst, and we still are gonna use it...
Thanks for the very comprehensive list! I didn't know there were this many!
I dont have any experience with git flow. I have plan to use it but need more knowledge before implement to my repository. Your article give me new information that there are some git flow.