Git Push Command

Git maintains local and remote branches for a codebase. A user creates a local copy of the central repository from the remote by using the git clone command.  Upon completion of a feature or new branch, a commit updates the local repository.  Git push command sends the new changes from local to remote, so that other developers can get the updates by doing a git pull.


$ git push -u origin <branch_name>

The first time a branch is pushed, use git push origin, the command is necessary for pushing the new branch, thereafter git push, will work. Pushing changes in the same branch having a name as a working branch.

git revert pushed a commit