Git workflow guidelines for growing technology team

Version Control System is one of the most common and integral parts of any technology company and git is unquestionably the most used VCS tool. Git is a very simple and quick tool to use. Once your team starts growing, you will some kind of process or workflow around git otherwise it will become a nightmare for the person who is in charge of managing and merging the code. Creating a workflow will also allow your organization to improve the performance and easily manage the growing team.
There are many workflows available on the internet and each workflow is best fit for different kind of team at the different stage. Here are the guidelines I personally follow, which also worked very well with different team size.

  • Create all the repos at an organization level.
  • Let all your team member fork the repo to their account(preferably created with organization email address) before start working on the project.
  • Follow git-flow branching structure to create branches likes features, release, and hotfix.
  • Always pull from the upstream develop before start working on the feature.
  • Test the code locally or on the server with production configuration.
  • Always send a pull request to upstream develop or feature branch.
  • Let your teammates review the code and fix based on the feedback.
  • Merge the code after thorough code review.
  • Create a release branch in the organization develop branch with the version number.
  • Review the code again if the release branch is merged with different feature pull requests.
  • Test the release branch in the staging environment.
  • Merge the code to master and create a tag with the version number.