Git Push or Git Push Command

Git maintains local and  remote branches for a code base. A user creates a local copy of central repository from the remote by using 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 git pull.


$ git push -u origin <branch_name>

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

git revert pushed commit


Leave a Comment

Your email address will not be published. Required fields are marked *