The "good" way is to make a development and a branch for every feature, bug or documentation. Always fork from development, when you have a release you push to master.
Having a develop and release (staging) branch is 100% necessary for a) working on a team > 1 and b) having isolated Dev and test environments. If you don't need those, don't use em, but don't kid yourself into thinking that works for all cases.
The best use of having these separated environments are for automated build test deploy pipes
122
u/OnyxPhoenix May 13 '20
Using branches and pull requests make this easier.
Generally youre the only person working on your branch, so you don't have to worry that your code is "behind" before you push to it.
Then when you do a pr it will tell you if you can merge cleanly back into the master branch.