Skip to content

Instantly share code, notes, and snippets.

@vitalyford
Last active October 4, 2023 17:17
Show Gist options
  • Save vitalyford/5f41824b75a57511eb060aa3f7c27d01 to your computer and use it in GitHub Desktop.
Save vitalyford/5f41824b75a57511eb060aa3f7c27d01 to your computer and use it in GitHub Desktop.
Defines the workflow of smaller team projects

Git Workflow

  1. At the beginning, create a master and dev branches.
  2. All development should be happening on a feature branch (i.e. when you receive an issue/improvement/feature, you should create a corresponding branch. For example, if you work on adding logs, you create a branch: feat/improve/add-logs).
  3. When making a commit, we should try to specify as much as we can in the commit message.
  4. One commit should be corresponding to one specific task being accomplished (e.g., do not put "add feature", "fix bug", and "change data structure" into one commit).
  5. We should create pull request (PR) from a feature branch to the dev branch once the code is well-tested in the feature branch. The PR should contain details of the current changes you have made so that the reviewer can review the code.
  6. We should release dev to master on a regular basis.

Important to Remember

  • Do not merge the feature branch to the master branch. Instead, only merge from the dev branch to master. For example, when it comes to a hot fix, we should merge from the hotfix branch to the dev branch first, then cherry-pick (learn here) that to the master branch.
  • Request PRs to be reviewed (the requests will also come automatically for the master and dev merges).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment