Skip to content

Conventions

When it comes to naming files and folders in your projects, it’s important to follow consistent conventions to ensure clarity and maintainability. Here are some guidelines to consider.

  • Avoid spaces: Use hyphens (-) or underscores (_) instead of spaces to separate words in file and directory names.
  • Avoid special characters: Refrain from using special characters such as !, @, #, $, %, ^, &, *, (, and ) as they can cause issues in different operating systems and tools.
  • Use lowercase letters: Stick to lowercase letters to avoid confusion, especially on case-sensitive file systems.

When writing Git commit messages, it’s essential to follow a clear and consistent format. Often when we’re working in a team, there are already established conventions for commit messages. If you’re contributing to an existing project, make sure to check if there are any guidelines in place.

If there are no established conventions, one approach is to follow the Conventional Commits specification. This involves using specific prefixes to indicate the type of change being made, such as feat for new features, fix for bug fixes, and docs for documentation changes.

For example, a commit message for adding a new authentication feature might look like this.

feat(auth): add user login functionality