I Need to Create Two Master Branches

Hello GitHub Support Community,

I’m a new GitHub user, and our technical documentation requires two separate release cycles, i.e., for two different products.

According to Stack Overflow, I found the following information:

Or to keep the tags in the same format, you may have two master branches (one per product), which you merge into respectively when a feature is completed for the respective product.

What I need to know is if a) the above is true (that you can have two master branches), and b) how to actually implement that? In other words, (it seems) that you can only set one branch as the default at a time. Is setting a branch to default the same as setting that branch as the Master?

Please advise. At the end of the day, my goal is to have two different and completely independent products each with their own release cycle.

Thank you.

As far as Git is concerned, all branches are equal. Their meaning (e.g. release branches for different products) can be whatever you ascribe to them. Just document which branch is for what so everyone knows what to look for (or merge) where.

For GitHub, you can have only one default branch. This decides which branch is shown if someone opens your repository in the web interface without selecting a branch, and Actions workflows for certain events have to be on the default branch.

For completely independent products, though, I wonder why you don’t use separate repositories. Do they share a lot of code, so they’re not that independent after all, just release decisions are independent?

Hello, thanks for the fast response, and you answered my question.

Regarding the independent products, no, they don’t share a lot of (or any) content (I am actually using GitHub for documentation and not code), so they truly are independent.

I understand, and it does seem that like making separate repositories is the way to go.

Thank you…

1 Like