Вот я как-то для проекта описывал workflow
In this project we work in team. 2,3 and more developers can do different features at same time. They can have different knowledge in PHP, GIT and standarts.
So we decided to make simple workflow for git, that important to use. Purpose is to make it so simple as possible and simple to understand for developers who used other workflows or even always edited master brange :)
This workflow very similar to Git Flow stratagy and Feature brange stratagy, but with some difference.
In Git Flow a lot of attention given to release branch. Git Flow project have rare releases that are pass tests and deeply tested.
In our project we don't have release branch and some features take few time, some a lot time. And most of them should be uploaded the next day after testing.
Puspose is fully separate staging code from production code. We start branches only from master branch and never from staging branch.
Also we should have good and clear history of commits.
We should be sure that changes of one developer will not disturb another developer
1. new feature:
New feature branch name should fully describe feature
New feature branch should be checkout from master branch
You can as many commits in feature branch, as you want.
When you done feature or have to test changes on staging - merge it to staging with "--no-ff --log" option
After feature tested you can merge it to master with "--no-ff --log" option
2. master hotfix:
If you need fast hotfix on master, like change typo, you can just create hotfix branch and then merge it to master with "--no-ff --log", then to staging with "--no-ff --log"
1. We have 2 default main branches:
master - production default branch, all pushed here automatically uploaded to production
staging - staging default branch, all pushed here automatically uploaded to staging
2. It is strongly prohibited to start new feature branches from staging
3. Mandatory to start new features from master
4. Before merging branch to master, merge master into branch to resolve conflicts.
5. Merging to master and staging should be with "--no-ff --log" option for better commits history
1. You can set "--no-ff --log" by default for master and staging branches in local repository config.
mergeoptions = --no-ff --log
Then git merge will work with that option
In PhpStorm it also work for toolbar merge
2. You can merge with any options from PhpStorm