Committing best practices

Most of the committing and pushing best practices are self-evident. One practice that might not be obvious is the importance of writing good commit messages. Descriptive commit messages can really help, especially after three months, when you are trying to figure out what prompted you to make a certain change, or in three years, when you inherit a repository from someone you cannot get in touch with.

The commonly stated best practices to adopt when committing code changes are as follows:

  • Writing descriptive commit messages
  • Committing often
  • Committing related changes together
  • Committing when a "unit of work" is done
  • Testing the code before committing
  • Running the full local test suite before pushing the commits to ...

Get Serverless computing in Azure with .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.