Clear commits make ZenOS easier to maintain and review.
Use:
type: short description
Examples:
kernel: update default configuration
rootfs: add initial filesystem layout
docs: improve build instructions
build: add QEMU boot script
New functionality.
feat: add network initialization
Bug fixes.
fix: correct initramfs generation
Documentation changes.
docs: add kernel development guide
Build-system changes.
build: add Docker development environment
Testing changes.
test: add QEMU boot test
Code restructuring without changing intended behavior.
refactor: simplify init startup
Security-related changes.
security: restrict service permissions
Maintenance work.
chore: update development dependencies
Good:
toybox: install utilities into rootfs
Avoid:
update
Avoid:
changes
Avoid:
fixed stuff
Prefer:
kernel: enable required filesystem support
followed by:
build: add filesystem test
instead of one large unrelated commit.
Run:
git statusReview:
git diffThen:
git add <files>
git commit -m "type: description"Never commit:
- Passwords
- API keys
- Tokens
- Private SSH keys
- Cloud credentials
- Personal credentials
Before pushing:
git diff --cachedReview the staged content.
If you have not pushed the commit:
git commit --amendUse history rewriting carefully on shared branches.