Updated
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
| Name | Short | Type | Default | Env | Description |
|---|---|---|---|---|---|
--pre-push-hook | bool | True | run pre-pre-push hook scripts before pushing to remote | ||
--force-with-lease | bool | force push using --force-with-lease to prevent overwriting others' work | |||
--only-head | bool | push only the current HEAD branch to the remote, ignoring other refs | |||
--only-branches | bool | push all local branches to the remote, ignoring tags and other refs | |||
--only-tags | bool | push all local tags to the remote without pushing any branches | |||
--both-branches-and-tags | bool | push all local branches and all tags to the remote in one operation |
#Arguments
| Name | Required | Description |
|---|---|---|
remote | no | name of the remote repository to push to (defaults to origin) |
#Grants
| Kind | Name | Reason |
|---|---|---|
| proc_mutate | push | publishing local refs to a remote is what this command is for |
| proc_mutate | force-push | --force-with-lease overwrites the remote ref, discarding whatever the lease expectation did not cover |