Skip to content

Latest commit

 

History

History
187 lines (121 loc) · 1.88 KB

File metadata and controls

187 lines (121 loc) · 1.88 KB

Commit Guidelines

Clear commits make ZenOS easier to maintain and review.

Commit Format

Use:

type: short description

Examples:

kernel: update default configuration
rootfs: add initial filesystem layout
docs: improve build instructions
build: add QEMU boot script

Commit Types

feat

New functionality.

feat: add network initialization

fix

Bug fixes.

fix: correct initramfs generation

docs

Documentation changes.

docs: add kernel development guide

build

Build-system changes.

build: add Docker development environment

test

Testing changes.

test: add QEMU boot test

refactor

Code restructuring without changing intended behavior.

refactor: simplify init startup

security

Security-related changes.

security: restrict service permissions

chore

Maintenance work.

chore: update development dependencies

Good Commit Messages

Good:

toybox: install utilities into rootfs

Avoid:

update

Avoid:

changes

Avoid:

fixed stuff

One Logical Change Per Commit

Prefer:

kernel: enable required filesystem support

followed by:

build: add filesystem test

instead of one large unrelated commit.

Check Before Committing

Run:

git status

Review:

git diff

Then:

git add <files>
git commit -m "type: description"

Do Not Commit Secrets

Never commit:

  • Passwords
  • API keys
  • Tokens
  • Private SSH keys
  • Cloud credentials
  • Personal credentials

Before pushing:

git diff --cached

Review the staged content.

Amending Commits

If you have not pushed the commit:

git commit --amend

Use history rewriting carefully on shared branches.