From the course: Complete Guide to Git

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Make atomic commits

Make atomic commits - Git Tutorial

From the course: Complete Guide to Git

Make atomic commits

- [Instructor] In this movie, I'll explain the importance of making atomic commits while you're developing a project. An atomic commit is named after atoms, which are the fundamental building blocks of matter. When you're developing and then committing changes you've made, it's up to you to decide how to group those changes into a set to store in the repository. It's a best practice to make small commits whenever possible. You can still group similar changes together, and a big feature might require changes to dozens of files, but keep commits focused on a single concept. You should not put unrelated changes in the same commit. There are a few reasons for this. Having several separate commit messages will make those change sets easier to understand when you're viewing the log file and when you use git show or git diff to look at the changes, they will contain only the changes related to a single task or to a common purpose. This is going to pay dividends when you start collaborating…

Contents