Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Creates the branch new-branch and switches to it. This branch forks whatever branch you’re currently on. The branch names should generally follow these formats:

  • feature/<issue-name> (for adding a new feature)

  • bugfix/<issue-name> (for fixing a bug)

  • hotfix/<issue-name> (for urgent fixes, e.g. security patches)

Commit code

Code Block
git commit -am "<commit message>"

Commits all changes to the code, with the summary message commit message. This creates a new version in the git history, which is important if you need to rollback at some point. It also allows you to publish your changes to GitHub.

In the commit message, always include the ID of the ticket you are workign on at the start of the message.

Push code

Code Block
git push

...

A pull request (or more intuitively, a merge request), allows other people to review your code before it’s merged back into the main branch (dev). You can do so by visiting our GitHub repo in your browser, then going to the “Pull requests” tab, then clicking “New pull request”, and selecting your branch. You can then add reviewers, which includes should include the team lead and other relevant people on the team (e.g. frontend people if it’s a frontend feature).