What are the differences between “git commit” and “git push”?

Basically git commitrecords changes to the repository” while git pushupdates remote refs along with associated objects“. So the first one is used in connection with your local repository, while the latter one is used to interact with a remote repository.

Here is a nice picture from Oliver Steele, that explains the git model and the commands:

Read more about git push and git pull on GitReady.com (the article I referred to first)

Leave a Comment