commit

/kəˈmɪt/noun

A commit is a recorded version of files in a version control system. Each commit marks a point in a project's development history.

The developer made a commit after fixing the bug and running the tests successfully.

A commit records the state of a project at a particular moment. In Git, each commit has a unique identifier and usually points to a previous commit. Together, commits form the history of the code. A developer can trace when a change was added and which version came before it.

What does a commit contain?

A Git commit refers to the recorded files and directories. It also contains information about the author, the time and a commit message. That message briefly explains why the change was made. Comparing the commit with its predecessor shows which lines or files changed.

Developers choose which changes to include in a commit. A small commit containing one coherent change is usually easier to assess in a Glossary · In briefcode reviewA code review is an assessment of a code change by another developer. They check its behaviour, readability, and maintainability, among other things, before the change is merged.Read more and easier to undo. This helps if a change later turns out to cause a bug.

Creating and sharing a commit

Committing means recording selected changes in the local history. In Git, this usually happens on the developer's own computer first. A push then sends the commit to a shared repository, where colleagues or an automated Glossary · In briefCI/CDCI/CD is a way of working in which teams frequently merge software changes, check them automatically and use a defined sequence of steps to prepare or deploy them to production.Read more can use it.

A commit is therefore different from a Glossary · In briefdeploymentA deployment is the process of installing and starting a chosen software version in a target environment so it can be tested or used there.Read more. A commit records a version in version control; a deployment puts a chosen version into a test or production environment. Nor does every commit have to enter the main version immediately. Several commits can first be tested and reviewed on a separate Glossary · In briefbranchA branch is a separate line of development in version control. Developers can make and test changes on it without immediately changing the main version of the code.Read more.