Skip to content

Branching and pull request guide

Ruben edited this page Oct 19, 2023 · 5 revisions

Branching and pull request guide.

Here you can find how to use branching and pull requests in this project

Tip: Remember to always follow our code of conduct, our contribution guidelines and our security policy

➕ Creating a new branch

When working on a new piece of the project, for example a webpage, a style update or a bugfix, you make a new branch. To do this:

  1. Open the repository homepage.
  2. Click the branch button.
  3. Open the 'main' branch.
  4. In the box Find or create a branch..., insert the name of the branch you want to use. Good names are descriptive of their purpose, for example, 'header_logo'
  5. Click the button Create branch: from 'main'

🖥 Connect VS code to the branch

To be able to work on the branch, you will need to connect to it in VS code.

  1. Access the Source Control tab on the left side of VS code.
  2. Click on the three small dots button next to the refresh button.
  3. Click on the Checkout to... option.
  4. Choose the branch you want to switch to. Make sure you have pushed or backed up any old code in your editor.
  5. Work in your editor and push and pull like normal. When its done, you can create a pull request.

🌿 Pull request for changes to 'main' branch

To bring the new updates into the main code, you need to create a pull request for it.

  1. On the GitHub website, press the Pull requests button in the navigation bar. You can also press the green Compare & pull request button. In that case, skip to step 5.
  2. Click the green New pull request button.
  3. Select the branches to push to and pull from.
  4. Click the green Create pull request button
  5. Fill in the details of your pull request, like the title, related issues, what step of the development plan its for and other contributors.
  6. Also fill in the details on the sidebar, like labels and assignees.
  7. Once that is done, click the green Create pull request button to submit the pull request.
  8. Once the pull request is merged, you can safely delete the branch if work is done in it.