Skip to content

Team rules

Huub van Holsteijn edited this page Nov 9, 2020 · 1 revision

Team rules

Commiting rules

When create a branch use the following convention. id_item-name the comes from Trello and the item-name is the feature name from Trello with the space replaced by dashes.

Git workflow

In order to provide quality control to the Smart Teddy project the four-eyes princple is used by using 'pull instead of push' method in Git. Where pull-requests are used to provide a feedback in GitHub. For uploading code in GitHub the following workflow is provided.

Cloning the project

Copying the Smart Teddy project from the online GitHub server to your Personal Computer File Directory that you are currently in.

  1. Open a terminal
  2. git clone https://github.com/smart-teddy-project-hhs/SmartTeddy.git

Pulling current work

Creating new code is not on the master branch, because the master is the current stable release of the software and should ready to upload to a PC or microcontoller to the consumer. Therefore you make a ' temporarial copy' of the master branch. After you're done you will need to make a push to master branch.

  1. Open a terminal
  2. git pull
  3. git branch branchname /origin/master (to create a new branch the current work on GitHub)

Switching branches

Changing from code copy to code copy is easy by switching from branch on your PC.

  1. Open a terminal
  2. git checkout nameofthebranch

Commit

To make the changes concrete in your PC you will need to 'commit' that your change is valuable by adding a messsage. The message provides feedback on the change written. For example writing newspaper on dementia in a TXT file, then your git message could look like. '1. Introduction Dementia in senior homes' and then after a second bit of writing '2. Paragraph Alzhheimers disease is common in 2020!' the message should describe what is part of your requirement.

  1. Open a terminal
  2. git add . (add all the changed files a new commit)
  3. git commit -m "message of upload"

Upload

When your are glad with the changes made in the branch code copy, then you will need to set the new changes from master onto your own PC branch.

  1. git checkout master
  2. git pull
  3. git checkout branchname
  4. git rebase master (Sets the current code from stable on your code)
  5. git push

Pull-request review

Now that your code is GitHub after the upload you can ask a college for review.

  1. Go to Github and sign-in
  2. Navigate to the Smart Teddy project
  3. Go to the Pull-request Tab
  4. Click on new to create a pull-request
  5. Added additional information if needed.
  6. 'Create' the new reviewable pull-request for your colleges to review.