Skip to content

Latest commit

 

History

History
124 lines (76 loc) · 4.78 KB

File metadata and controls

124 lines (76 loc) · 4.78 KB

Git workflow for tasks

Note

This procedure is based on the GitHub flow.

Issue ➜ Branch ➜ Commits ➜ PR ➜ Review ➜ Merge

The following diagram shows this workflow in the context of repositories:

Git workflow

Outline:

Create a Lab Task issue

Create an issue using the Lab Task issue form.

Switch to the main branch

Switch to the main branch in VS Code.

Pull changes from main on origin

Pull changes from main on origin.

Pull changes from main on upstream

Pull changes from main on upstream to get the latest fixes from the instructors' repository.

Switch to the <task-branch>

Create a new <task-branch> and switch to it.

<task-branch>

The new branch for the task.

Alternatively, the name of that branch (without < and >).

Edit files

Edit files using VS Code to produce changes.

Commit changes

Commit changes to the <task-branch> to complete the task.

(Optional) Undo commits

Undo commits if necessary.

Push commits

  1. Publish the branch with your changes if it's not yet published.
  2. Push more commits to the published branch if necessary.

Create a PR to the main branch in your fork

Create a PR from the branch <task-branch> to main. Replace:

Warning

By default, GitHub sets the base repository to the upstream (inno-se-toolkit). You must change the base repository to your own fork (<your-github-username>/<lab-repo-name>) before creating the PR. Do not create PRs to the upstream repo.

Get a PR review

  1. Request a review of the PR from the collaborator.

  2. Conduct the PR review together following the PR review rules.

  3. Get the collaborator to approve the PR.

PR review rules

PR review rules for the reviewer

As a reviewer:

  • Check the task's Acceptance criteria.
  • Leave at least one comment — point out problems or confirm that items look good.
  • Approve the PR when all relevant acceptance criteria are met.

PR review rules for the author

As a PR author:

  • Address reviewer comments (fix issues or explain your reasoning).
  • Reply to comments, e.g., "Fixed in d0d5aeb".

Merge the PR

Click Merge pull request.

Clean up

  1. Close the issue.

  2. Delete the PR branch (<task-branch>).