-
Notifications
You must be signed in to change notification settings - Fork 3
Home
We use GitHub flow to manage our workload.
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:
- Open terminal and retrieve the latest version of the repo
git pull origin
. - Create a new branch with
git checkout -b [your-branch-name]
. - Make your changes and stage the relevant file(s) with
git add [file-path]
. - Commit your changes with
git commit -m "commit-message-describing-your-changes"
. - Push your committed changes to the remote repo with
git push -u origin [your-branch-name]
. - 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 youfetch/pull
frommain
, 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.