Skip to content

Instantly share code, notes, and snippets.

@harilvfs
Last active May 30, 2025 18:54
Show Gist options
  • Save harilvfs/53cc86aa79ea4642356540aadc6bd87d to your computer and use it in GitHub Desktop.
Save harilvfs/53cc86aa79ea4642356540aadc6bd87d to your computer and use it in GitHub Desktop.
๐Ÿท๏ธ GitHub Commit Labels (Conventional Commits)

๐Ÿท๏ธ GitHub Commit Labels (Conventional Commits)

Use these labels to categorize commits for better readability and automation.

๐Ÿ”น Main Commit Types

Label Meaning
feat Adding a new feature
fix Fixing a bug
docs Documentation changes (README, Wiki, etc.)
style Code style changes (formatting, linting, no logic changes)
refactor Refactoring code without adding features or fixing bugs
perf Performance improvements
test Adding or updating tests
build Changes affecting the build system (package manager, Makefile, etc.)
ci Changes to CI/CD configurations (GitHub Actions, Travis, etc.)
chore Miscellaneous changes (updates to dependencies, scripts, etc.)
revert Reverting a previous commit

๐Ÿ”น Less Common Types

Label Meaning
init Initial commit
wip Work in progress (not final)
security Security-related fixes or improvements
infra Infrastructure-related changes
db Database changes (migrations, schema updates)
breaking Introduces breaking changes (often used as feat!: message)

๐Ÿ”น Scope-Based Labels

To specify the affected part of the project, use scopes in parentheses:

feat(ui): add new dark mode toggle
fix(api): resolve authentication issue
docs(readme): update installation guide

More

โœ… Conventional Commits Cheat Sheet

Type When to Use
feat For a new feature adds new functionality or capability
fix For a bug fix corrects incorrect or broken behavior
chore For non-functional changes configs, build scripts, or metadata
docs For documentation changes only (README, inline docs, etc.)
style Code style changes (whitespace, formatting, linting no logic change)
refactor Code refactor without changing external behavior
perf For performance improvements
test Adding or updating tests
build Changes that affect the build system (e.g., makefiles, package managers)
ci Changes related to CI/CD (e.g., GitHub Actions, Travis)
revert Reverts a previous commit

๐Ÿงฉ Common Scopes (Optional but Helpful)

Scope Typical Use
core Main logic or functionality
ui Terminal or graphical user interface
deps Dependency related changes (e.g., Cargo.toml, package.json)
docs Documentation files
setup Install/bootstrap/initialization scripts
scripts Bash or other automation tools
desktop .desktop files or related metadata
config Configuration files (.gitignore, .editorconfig, etc.)

๐Ÿ“Œ Examples

feat(setup): add automated Neovim installation via fzf
fix(core): resolve crash when config file is missing
chore(desktop): add Keywords field to .desktop file
docs(readme): update usage instructions for new install flag
refactor(scripts): split setup.sh into modular functions
style(core): reformat using rustfmt
perf(core): reduce setup time by caching downloads
test(core): add tests for package manager detection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment