SyntaxStudy
Sign Up
Home Git Reference git push

git push

command

Uploads local commits to the remote repository.

Syntax

git push [remote] [branch]

Example

bash
git push                      # push to tracked remote
git push origin main          # push main to origin
git push -u origin feature    # push and set upstream
git push origin --delete old-branch  # delete remote branch
git push --tags               # push all tags