In a Git tutorial I'm going through, git commit is used to store the changes you've made. What is git push used for then? Thanks for reading!
Basically git commit
"records changes to the repository" while git push
"updates 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, that explains the git model and the commands.
"git push" is used to add commits you have done on the local repository to a remote one - together with "git pull", it allows people to collaborate.
commit: adding changes to the repository
push: to transfer the last commit(s) to a remote server
Since git is a distributed version control system, the difference is that commit will commit changes to your local repository, whereas push will push changes up to a remote repo.
Well, basically git commit puts your changes into your local repo, while git push sends your changes to the remote location.