Skip to content
Simone Duca edited this page Dec 1, 2021 · 4 revisions

Welcome to the DWP Design System wiki.

Git workflow

We use GitHub flow to manage our workload.

GitHub flow diagram

To follow GitHub flow, you only need a bunch of git commands. Gitlab provides a general but useful cheatsheet. A typical start of your work could be:

  1. Open terminal and retrieve the latest version of the repo git pull origin.
  2. Create a new branch with git checkout -b [your-branch-name].
  3. Make your changes and stage the relevant file(s) with git add [file-path].
  4. Commit your changes with git commit -m "commit-message-describing-your-changes".
  5. Push your committed changes to the remote repo with git push -u origin [your-branch-name].
  6. You can now open a merge request to start reviewing the changes with your team. In Gitlab you can mark a merge request as "draft", if you know you will add more changes.

A couple of things to keep in mind or good practices:

  • Remember to fetch/pull the latest changes from the remote repo, before you start adding your own. This ensures you have the latest version of the branch you're working on, which makes for smooth collaboration. For the same reason, when you create a fresh feature branch, make sure you fetch/pull from main, before creating the new branch.

  • Try to keep feature branches short-lived, i.e. merge them back to main as soon as you can. This encourages better collaboration (e.g. shorter reviews times) and pain-free merges.

Clone this wiki locally