ooloo.io
Start
Task 3: Content Container
Planning & ImplementationHint
Task 5: Bottom Section
PlanningImplementationHint
Task 3: Content Container (continued)
Change RequestsUpdate Pull Request

The Flow

The GitHub Flow

As mentioned the GitHub flow is relatively lightweight. This is what it looks like in a nutshell:

  1. Create a new branch to implement the feature (or bugfix...).
  2. Implement the code and add commits to the branch.
  3. Push the code to the remote repository on GitHub.
  4. Open a Pull Request on GitHub.
  5. The code gets reviewed and discussed.
  6. Merge the branch to the main branch (aka master).

This may look very simple at first. But it can get quite complicated when used in a team. More on that on the next page.

For now, here's some lingo explanation:

  • When you build a feature on a branch it is called feature branch.
  • A Pull Request or PR is a place where your team can review and discuss the code changes.
  • GitHub replaced the default master branch with main. Mental note: main = master

You can see a more interactive description of the GitHub flow here. I left out the Deploy step since it's different for every team and depends on their setup.

These are only 6 steps and only a couple of them require you to use Git yourself. The most basic Git commands you need are

  • git branch to create a branch
  • git checkout to switch branches
  • git commit to add changes
  • git push to update the remote repository
  • git pull to sync your local repository with the remote

You don't even need to merge yourself in the command line since you'll simply press a button in the Pull Request.

By the way, no worries if you're not used to working on branches yet. You'll get there. But I hope you heard of most of these commands. Otherwise, make yourself familiar with a bit of research.

Note: Even though it's called GitHub flow you can use this flow on GitLab or BitBucket as well. The important thing is that you use Pull Requests to merge your code to the main branch (also called Merge Requests on GitLab)


Next: When it gets complicated

Terms of UsePrivacy