gitgithubgit-flow

What are the consequences of making `develop` the default branch on GitHub?


We are adopting the git-flow methodology and have started using GitHub in our company to organize our work and help collaborate.

But our industry has fairly long development cycles (many years between formal releases), so we may be on the develop branch for many months at a time. Several nice GitHub features are triggered only when you push to master, however:

So we can't use GitHub to automatically track progress until several months later, and the project is mostly done. I believe that if I make develop the default branch, this problem will go away.

But are there other problems that might come up? Like, I still want master to be the front page. I'm worried that people who come to the project will just see the latest development version, which might not have bug checks, etc.


Solution

  • I would recommend keeping master as your default branch. Even if it's not in a release, users should see reasonably stable code when they visit your project's default branch on GitHub.

    I believe GitHub's feature-based restrictions based on the default branch are designed to encourage considering work as done when it is marked as stable (which should happen when it is moved to the default branch). If you want to continue using these features while keeping master stable, I would consider merging into master more frequently (while keeping it stable, and using peer reviews if necessary). You could also use develop as your default branch, but keep it stable (which would involve having more strict reviews when merging code into develop).