safegit v0.26.0 /safegit push
On this page

Reference for the safegit push command — usage, flags, arguments, and examples for the push subcommand of the safegit CLI.

#safegit push

push refs to remote with pre-pre-push hooks and automatic retry

Effect: mutating

#Flags

Flags
NameShortTypeDefaultEnvDescription
--pre-push-hookboolTruerun pre-pre-push hook scripts before pushing to remote
--force-with-leaseboolforce push using --force-with-lease to prevent overwriting others' work
--only-headboolpush only the current HEAD branch to the remote, ignoring other refs
--only-branchesboolpush all local branches to the remote, ignoring tags and other refs
--only-tagsboolpush all local tags to the remote without pushing any branches
--both-branches-and-tagsboolpush all local branches and all tags to the remote in one operation

#Arguments

Arguments
NameRequiredDescription
remotenoname of the remote repository to push to (defaults to origin)

#Grants

Grants
KindNameReason
proc_mutatepushpublishing local refs to a remote is what this command is for
proc_mutateforce-push--force-with-lease overwrites the remote ref, discarding whatever the lease expectation did not cover
Search