Other people's git workflows

Notes on my current favorite git workflow

i like for small projects, or, for projects where there is a separate release manager or ops team, a variant of this where 'develop' and 'master' are two separate repos (the motivation being so that you can have different access control on each repo; the 'develop' repo is 'owned' by the lead dev, and the 'master' repo is owned by testing/ops; this encourages testing/ops to take a hard line when the lead dev and testing/ops disagree on how strict the criteria should be for the transition from staging to release).

Also, why not use --no-ff when merging develop into master? Not sure i understand the reason for not doing that. I'm going to try it someday.

Notes on the git commands needed to do various things in this:


The short of it is: if you are the lowest hierarchical level in a tree of development branches (i.e. a single person's working branch), then always rebase when you pull from higher levels of the hierarchy. If, however, you are not the lowest level (you are someone else's upstream), then merge.

Details and discussion

Protecting github repos

" A remote repository can disable such operations with the setting receive.denyDeletes to prevent any ref deletion, and avoiding non-fast-forward branches with the receive.denyNonFastforwards. If either of these are set, then deletes have no operation and pushes cannot overwrite code which doesn’t strictly follow it in history. (This is occasionally a useful operation; it may be necessary to provide a means to elevate this in certain situations if necessary.) " --






Misc advice/tips

Random useful answers to questions or gotchas