I am learning Git, and I would like to know where the pull requests should be target, to main or dev branch? I mean I create a feature branch locally, add some commits, the I do git push origin feature-branch, then I create the pull request, but this should target the main or dev branch?
I read some articles that you never should push to the main branch, thats why you use pull requests. Also I would like to know if the I am doing ok with a personal project I have, The main project, in production, uses the main branch, and the demo project(which has the new features first), uses the dev branch, both are online, is that approach ok?, thanks
>Solution :
Answer to the first question – whichever branch you’re supposed to use.
depending on your company/team/workflow.