You should have 3 branches
master/main
qa
development
And seperate branch for each feature which gets deleted after merging.
First make a pr on development, if it's working properly and create a pr from development to QA, then after testing from create PR from QA to master/main
Honestly, I don't think that's necessary. Yeah, some teams work like that. My current team also uses a development and master branch. But it highly depends on the deployment process. And tbh it's quite annoying if you use mandatory code reviews and want to deploy often.
If you use continuous deployment in combination with preview branches you use a super modern and professional workflow. It works like this:
You have one branch called main (or master or whatever)
You create new branches from main to implement your features
You create a PR to merge the branch into main
The PR gets deployed to a temporary domain where you can test the code in production conditions
If everything is alright you merge the branch
the main branch is then automatically deployed to production (this is called continuous deployment)
In a real team your coworkers would ideally review your code to improve quality.
Deploying the branch is usually a bit tricky if you set up deployment yourself. But in your own projects you can simply use Vercel or Netlify. They are free, easy to set up and give you advanced features like branch previews out of the box.
Btw if you where hinting at the good old "git flow" there's no need for it for a typical web app. The author himself recommend against using git flow for web apps as you can read on the original article
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You should have 3 branches
master/main
qa
development
And seperate branch for each feature which gets deleted after merging.
First make a pr on development, if it's working properly and create a pr from development to QA, then after testing from create PR from QA to master/main
Honestly, I don't think that's necessary. Yeah, some teams work like that. My current team also uses a development and master branch. But it highly depends on the deployment process. And tbh it's quite annoying if you use mandatory code reviews and want to deploy often.
If you use continuous deployment in combination with preview branches you use a super modern and professional workflow. It works like this:
In a real team your coworkers would ideally review your code to improve quality.
Deploying the branch is usually a bit tricky if you set up deployment yourself. But in your own projects you can simply use Vercel or Netlify. They are free, easy to set up and give you advanced features like branch previews out of the box.
Wow that's quite a long process 😅
Will try to follow the steps 😇
See my comments above. No need to overthink git for your own projects imo 😊
You're right, creating 2-3 branches for prod, prev and dev in personal projects is kinda stretch !
As I use vercel the branch preview does the job !
Btw if you where hinting at the good old "git flow" there's no need for it for a typical web app. The author himself recommend against using git flow for web apps as you can read on the original article