Further refinements for the git push command.

interface Push {
    force?: boolean;
    localBranch?: string;
    remote?: string;
    remoteBranch?: string;
    setUpstream?: boolean;
}

Properties

force?: boolean

Usually, the command refuses to update a remote ref that is not an ancestor of the local ref used to overwrite it. This flag disables these checks, and can cause the remote repository to lose commits; use it with care.

localBranch?: string

The name of the local branch to push. If not given, then the currently active branch will be used instead.

remote?: string

The name of the remote to push to. If not given, then the default remote will be used. It is the origin by default.

remoteBranch?: string

The name of the remote branch to push to. If not given then the changes will be pushed to the remote branch associated with the local branch.

git push <remote> <localBranch>:<remoteBranch>

setUpstream?: boolean

Set upstream for every branch that is up to date or successfully pushed, add upstream (tracking) reference, used by argument-less git-pull and other commands.