Take the 2-minute tour ×  We have three main branches in our
workflow.  TEST (experimental), RELEASE (features going to next
release), and MASTER (released only)  We take feature branches
from RELEASE, merge feature branches first to TEST and if they
are ok, merge those approved feature branches to RELEASE.  My
problem is: as TEST branch contains some commits/features that
we will not be releasing ever, we don't want it to merged into
RELEASE or MASTER by mistake (or intentionally).  I read
somewhere that it is not possible or feasible to prevent merges
in local repositories, and i don't think it would solve my
problem.  So, probably it is better to prevent updates to MASTER
or RELEASE branch refs in main repository (by pushing to origin)
when the new ref contains a specific commit ID of TEST branch in
its commit log.  So i'll make a specific commit only to TEST
branch, and record its Commit ID.  Whenever someone wants to
push to master or release branch, i'll check if that push will
update my refs/heads/mast