Git Conventions
Branch naming rules, commit message format, and Gitmoji conventions for the Ledger Wallet repository.
Branch Naming
- Use short, clear and descriptive names that provide immediate context. For example:
feature/loginorfix/navbar-overflow. - Use hyphens to separate words:
fix/login-issueis preferred overfix/LoginIssueorfix/login_issue. - Use only lowercase alphanumeric characters (a-z, 0-9) and hyphens.
- Use prefixes for organization:
| Prefix | Purpose |
|---|---|
feature/ or feat/ | Creating new features |
fix/ | Addressing code bugs |
doc/ | Updating, modifying, or correcting documentation |
- Add ticket numbers if your project uses an issue tracking system. If there is no ticket number, use
no-issue.
Example: feature/PROJ-123-footer-links
Commit Messages
Format
The commit message is composed of:
- The
doc,feature, orfixprefix between parentheses - The related ticket number or
NO-ISSUEbetween brackets - A short description
Gitmoji
We recommend using Gitmoji to write commit messages.
| Emoji | Usage |
|---|---|
| :tada: | Begin a project |
| :construction: | Work in progress |
| :memo: | Add or update documentation |
| :pencil2: | Fix a typo |
| :sparkles: | Implement a new feature |
| :bug: | Fix a bug |
| :recycle: | Refactor code |
| :wastebasket: | Deprecated code needed to be removed |
| :mag: | Improve SEO |
Example
With Gitmoji and the naming convention, the commit looks like:
📝(doc) [NO-ISSUE]: DMK video presentationSee also
- How to Structure a Feature — Includes guidance on when to use
feature/vsfix/branches