Chapter 12. Creating a clean history

This chapter covers

  • Writing a good commit message
  • Building a commit using only certain changes in a file
  • Building a commit using a graphical application
  • Avoiding committing bad whitespace

You saw in technique 4 that a clean history can make it easier to find useful information. For a history to be clean, it should use good, well-formatted commit messages for commits that are as small as possible. In this chapter, you’ll learn how to create a clean history.

12.1. Writing a good commit message

Technique 4 explained why small commits are better and how commit messages should be formatted. Let’s go into more detail about what makes a good format when writing commit messages, and why.

The following listing ...

Get Git in Practice 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.