After thinking a little about it I would change the subject from Making it difficult to mess up the master
branch to Get rid of the master
branch.
Here is how I would manage the app versioning:
- A newly created app has one
dev
read-and-write branch and onepub
read-only branch, each with its own environment - The
Version History
UI allows to create new branches and set them read-only or read-and-write - The
Publish
dialog allows to define more environments and link them to their branches - In the
Publish
dialog (or somewhere else in the app settings) there is anOnly merge to read-only branches
checkbox, which is checked by default - The
Editing branch
drop down does not show read-only branches - If there is only one read-only branch, then the
Merge
button will merge to that branch - If there are more read-only branches, then the
Merge
button will ask which branch to merge to
This setup will allow both one-click publishing for beginners and fancy setups for experts:
- If you are a beginner, you edit your app and click on
Merge
when you are ready. If you want to revert to an older version, you can right click on a commit and clickMove the "pub" branch here
- If you are an expert, you can uncheck the
Only merge to read-only branches
, setup all your branches to be read-and-write and enjoy all the flexibility you want. You can even create a new branch and call itmaster
!!