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.

""</p

$ git push -u origin <branch_name>

The first time when a branch is pushed, the use git push origin, command 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

 

Leave a Comment

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

Scroll to Top