Guidelines for Committing Code

Guidelines for Committing Code

  1. Atomic Commits: Keep each commit focused on a single logical change. Avoid mixing unrelated changes in the same commit.
  2. Descriptive Messages: Write clear and descriptive commit messages summarizing the changes introduced. Start with a short, imperative verb phrase (e.g., "Add feature" or "Fix bug").
  3. Be Succinct: Keep commit messages concise while providing enough context for understanding the change.
  4. Use Branches: Do not commit code directly to main/trunk. Commits should be confined to a branch.
  5. Format Consistency: Follow a consistent commit message format within your project or team to enhance readability and searchability.
  6. Prefix Issues: Prefix commit messages with the relevant redmine task type and task number. For example:
    1. feature #1234 – added delete button to reservations table
    2. bug #8675 – fixed infinite loading bar on transactions table
  7. Test Before Committing: Ensure that your changes are tested and verified before committing them to the repository.
  8. Commit Often: Make frequent, small commits to track your progress and make it easier to review and revert changes if needed.
  9. Review Changes: Before committing, review your changes to ensure they adhere to coding standards, maintain readability, and follow project conventions.
  10. Avoid Committing Sensitive Information: Be cautious not to commit sensitive data like passwords, API keys, or personal information.

    • Related Articles

    • Code Review Policy

      Code Review Policy Objective: The primary goal of our code review process is to ensure high-quality, maintainable, and efficient code that aligns with the team's standards and best practices. Code reviews serve as a collaborative effort to enhance ...
    • Code Review Checklist

      Before asking for code to be reviewed, the following steps should be completed. This will ensure a smooth review process and help code to get checked in more quickly. Javadocs created/updated Method and class level comments added Back office ...
    • Check Code Into Subversion

      Instructions Once you have run your project and you are satisfied with your test results, you will want to check in code to our repository. All of our code is stored in a central repository hosted in our data center. The subversion tool, Tortoise ...
    • Git Guide

      For most of our new projects (circa 2023 or later), we use Git for version control. All of the code for these proejcts is hosted on Github at https://github.com/FullCount-Development. For working with Git, we have the option of using Git command line ...
    • HTML code to adjust text fields in the Back Office for FullCount Engage

      HTML code to adjust text fields in the Back Office for FullCount Engage HTML Code Use Case <p style="font-size:desired font sizepx">desired text here</p> Adjust font size <strong>desired text here</strong> Bold text <u>desired text here</u> Underline ...