Skip to content

    Commit

    Reading time: 2 min.Editorially reviewed on:

    Definition

    A commit records a traceable version state along with a description in the Git history.

    A Git commit captures a project state and links it with predecessors and metadata. It usually arises from the prepared changes in the staging area. Its identifier makes the state uniquely referable; a message describes the reason.

    Simply explained

    You set a labeled checkpoint to which you can later return and compare changes.

    Why it matters in practice

    Small, understandable commits facilitate debugging, collaboration, and the assignment of changes to their purpose.

    Example from business

    Possible example: A corrected form validation is saved with a message explaining the fixed input error.

    Limits and pitfalls

    • A commit neither automatically publishes a website nor necessarily uploads data to GitHub. Confidential files can accidentally become permanently part of the history.

    Origin & history

    Git separates working files, prepared changes, and stored history; a commit is the saved version step.

    Use in mid-sized companies

    • Teams group factually related changes together and check the actually staged content before committing.

    Frequently asked questions

    Is commit the same as push?

    No. The commit is initially created in the local repository; push transfers local versions to a remote repository.

    Sources

    Editorially reviewed on:

    On this page

    Next step

    Put knowledge into practice