Curriculum
Course: Git
Login
Text lesson

GitHub Flow

Working using the GitHub Flow

On this page, you’ll learn how to maximize your use of GitHub.

GitHub Flow is a workflow tailored for Git and GitHub, emphasizing branching to allow teams to experiment freely and deploy regularly.

The GitHub Flow process is as follows:

  1. Create a new branch
  2. Make changes and add commits
  3. Open a pull request
  4. Review the changes
  5. Deploy
  6. Merge

You should already be familiar with this process from previous chapters. This chapter will focus on how the flow facilitates collaboration.

Create a New Branch

Branching is a core concept in Git, centered around the principle that the master branch is always deployable.

This means that if you want to try something new or experiment, you create a new branch. Branching provides an environment for making changes without affecting the main branch.

Once your new branch is ready, it can be reviewed, discussed, and merged into the main branch when appropriate.

When creating a new branch, you’ll typically start from the master branch.

Note: Remember that you are collaborating with others. Use descriptive names for new branches to ensure everyone can understand the purpose of each branch.

Make Changes and Add Commits

Once the new branch is created, start working by adding, editing, and deleting files. Whenever you reach a small milestone, save your changes to the branch by making a commit.

Commits track your progress, with each one including a message explaining what has changed and why. Each commit becomes a part of the branch’s history, providing a point to revert to if needed

Note: Commit messages are crucial! They inform everyone about what has changed and why. Clear messages and comments make it much easier for you and others to track changes.