git-push
Upload local commits to remote
TLDR
Push to remote
SYNOPSIS
git push [options] [remote] [refspec]
DESCRIPTION
git push uploads local commits to a remote repository, updating remote refs with local refs and transferring the objects needed to complete them. This is how local work becomes shared with collaborators.
The `--force-with-lease` option provides a safer alternative to `--force` by checking that the remote hasn't been updated since your last fetch before overwriting. The `-u` flag sets upstream tracking, simplifying future push and pull commands.
PARAMETERS
REMOTE
Remote repository name.REFSPEC
Refs to push.-u, --set-upstream
Set upstream tracking.--all
Push all branches.--tags
Push tags.--force
Force update remote refs.--force-with-lease
Safe force push.--delete
Delete remote ref.--dry-run
Show what would be pushed.--help
Display help information.
CAVEATS
Force push overwrites remote history. Use --force-with-lease for safety. Branch protection may restrict pushes.
HISTORY
git push is a core Git command from initial release, implementing the distributed workflow by enabling commit sharing.
SEE ALSO
git-pull(1), git-fetch(1), git-remote(1)
