git push

Uploads local commits from the current branch to its configured remote branch.

This command is used to share your local work with others by sending your commits to a remote repository. It updates the remote branch that your current local branch is tracking, allowing collaborators or deployment systems to access your latest changes.

The command uses the current branch as the source and pushes it to its default upstream target, which is usually a <remote>/<branchname> configured when the branch was created or previously pushed. With no extra flags or parameters, it only sends new commits and will fail if the remote has conflicting changes that you have not pulled.

Related: Use git push <remote> <branchname> to explicitly specify where to push, git push -u <remote> <branchname> to set the upstream for future simple pushes, or git push --force-with-lease to overwrite remote history more safely when necessary.

Manual page
git push
Related commands

Sign in to Git Examples