We recently switched from SVN to GIT in the project, git commit
saving changes that have been made locally. So what is git push
? What is the difference between the git push
and commands git commit
?
We recently switched from SVN to GIT in the project, git commit
saving changes that have been made locally. So what is git push
? What is the difference between the git push
and commands git commit
?
git push
is a command that uploads the changes made in your work environment to a work branch of yours and/or your remote team. Commit identifies the changes made in said work environment. If you don't make onepush
of your changes, they will never be reflected in your remote repository.At the job level,
git push
it works at the repository level, that is, with your remote repository, while itgit commit
works on your local repository.EDIT
When you use the command
git status
and previously committed without having donegit push
(without having applied the changes in your remote repository) you can verify the files that you locally modified. This is what I meant by "identifying" a commit.To supplement possible answers, I quote an image in a question on the English StackOverFlow .
In very basic terms push sends the changes to your remote repository, while commit does it to the local repository.
git push
push changes to the central repository, commonly called origin, so that other developers can download your changes.