push

Purpose:

Update a mirror of this branch.

Usage:

brz push [LOCATION]

Options:
--create-prefix

Create the path leading up to the branch if it does not already exist.

-d ARG, --directory=ARG

Branch to push from, rather than the one containing the working directory.

-h, --help

Show help message.

--lossy

Allow lossy push, i.e. dropping metadata that can’t be represented in the target.

--no-tree

Don’t populate the working tree, even for protocols that support it.

--overwrite

Ignore differences between branches and overwrite unconditionally.

--overwrite-tags

Overwrite tags only.

-q, --quiet

Only display errors and warnings.

--remember

Remember the specified location as a default.

-r ARG, --revision=ARG

See “help revisionspec” for details.

--stacked

Create a stacked branch that references the public location of the parent branch.

--stacked-on=ARG

Create a stacked branch that refers to another branch for the commit history. Only the work not present in the referenced branch is included in the branch created.

--strict

Refuse to push if there are uncommitted changes in the working tree, –no-strict disables the check.

--usage

Show usage message and options.

--use-existing-dir

By default push will fail if the target directory exists, but does not already have a control directory. This flag will allow push to proceed.

-v, --verbose

Display more information.

Description:

The target branch will not have its working tree populated because this is both expensive, and is not supported on remote file systems.

Some smart servers or protocols may put the working tree in place in the future.

This command only works on branches that have not diverged. Branches are considered diverged if the destination branch’s most recent commit is one that has not been merged (directly or indirectly) by the source branch.

If branches have diverged, you can use ‘brz push –overwrite’ to replace the other branch completely, discarding its unmerged changes.

If you want to ensure you have the different changes in the other branch, do a merge (see brz help merge) from the other branch, and commit that. After that you will be able to do a push without ‘–overwrite’.

If there is no default push location set, the first push will set it (use –no-remember to avoid setting it). After that, you can omit the location to use the default. To change the default, use –remember. The value will only be saved if the remote location can be accessed.

The –verbose option will display the revisions pushed using the log_format configuration option. You can use a different format by overriding it with -Olog_format=<other_format>.

See also:

pull, update, working-trees