Skip to content

Build & Upload

This guide explains how to set up a worktree, build and verify firmware, and submit a Merge Request on GitLab.


1. Create a Worktree

Create a worktree from main for a new feature branch:

git worktree add ../kurikintons-my-feature main
cd ../kurikintons-my-feature
git switch -c feature/my-feature

Or from an existing feature branch:

git worktree add ../kurikintons-my-feature feature/my-feature
cd ../kurikintons-my-feature

Worktrees stay on your branch

Unlike git checkout, a worktree created from a branch stays on that branch and is not in detached HEAD state. You can commit changes directly.


2. Build and Verify

Build the firmware:

task v2:build

Upload to your device:

task v2:upload

Verify output with the serial monitor:

task monitor

3. Commit Changes

Run pre-commit checks before committing:

task pre-commit

Commit using conventional commit format:

git commit -m "feat(my-feature): add my feature"

See Pre-commit Hooks for details on checks and commit message format.


4. Push and Create a Merge Request

Push your branch to GitLab:

git push -u origin feature/my-feature

Create a Merge Request with glab:

glab mr create --fill

This opens an editor to review the MR title and description before submitting.


5. Remove Worktree

After your MR is merged, remove the worktree:

git worktree remove ../kurikintons-my-feature

See Also