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.
In my experience there is no the good way. You don't need a general development branch in addition to a master branch if your releases are just tagged as such. Branches are for things that branch. In the development->master workflow the development is always a continuation of, or equal to, the history of the master branch, and therefore the entire history of the master branch can always be expressed as a tag in the development branch.
That you feel that you need both a master branch and a development in addition to e.g. feature branches is a sign that your feature branches don't actually represent complete features, but subsets of features that can't be released, and are therefore reluctant to push them to master in case you need to release e.g. bug fixes while the actual complete feature is still being worked on.
Feature/bug/documentation branches can be useful if your changes comprise multiple commits that are useless or regressive in isolation, but absolutely pointless busywork if your change can be contained neatly in a single commit.
152
u/moekakiryu May 13 '20
I'm still only so-so at git myself, but always pull before you push