Presented by Krishna Prasad

About Us

What is our aim

Git push ( git push ) Command

git push command is for publishing your local changes to remote so that every one can have access of your changes git push origin branchName will push your remote origin branch branchName into repmote server

If you have multiple remotes, you can check this by git remote -v, then you need to specify the remote as well, so the basic command of git push is: git push remoteName branchName

Defualt remote is origin, for adding new remote please check this tutorial: git remote

Summary

git push is used to update the remote repository contents using local repository. It enables to transfer the commits made on the local repo to the remote repo.

git push can be seen as an opposite command to git fetch.

git fetch helps in importing the contents from remote repository to local repository while git push does the opposite by exporting/pushing the contents from local repository to remote repository.

References: