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.
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.
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.
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.