Skip to content
BENIBIX Learn

Git Commit vs Git Push

A commit saves a change on your own computer. A push sends your commits to the shared remote, where the team can see them.

Development🔀 Version Control

Commit

A saved snapshot of your project, with a note saying what changed.

A commit is a saved snapshot of your project at one moment. It holds the staged changes, a short message, the author's name and the time. Each commit gets a unique code, like 93eadff, so you can find it later. Commits link to the one before, which makes a chain that is the project's history. A commit lives only on your computer until you push it.

Example
Jack finishes the home page and commits it with the note Add home page. Weeks later he can still see exactly that version.
Why it matters
Commits are the steps of a project's history. Good ones make bugs easy to trace and undo.
Full entry
Development🔀 Version Control

Git Push

Sending your new commits up to the shared remote. Then the team can get them.

To push is to send your new commits from your computer to a remote. After a push, your team can see and pull your work. Git refuses the push if the remote has commits you do not have yet. Then you pull first, sort out any conflicts and push again. A push only sends commits, so unsaved or uncommitted work stays behind.

Example
Emma pushes her dark-mode commits at the end of the day. The next morning, Jack pulls them and sees the new look.
Why it matters
Work that is not pushed only exists on one laptop. Pushing shares it and backs it up.
Full entry

In one line

Commit
A saved snapshot of your project, with a note saying what changed.
Git Push
Sending your new commits up to the shared remote. Then the team can get them.