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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Basically,
git commit"records changes to the repository" whilegit 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 from Oliver Steele, that explains the Git model and the commands:
Read more about
git pushandgit pullon Pushing and pulling (the article I referred to first).