Git like Mercurial

gg push

gg push [-f] [-n] [-r REV] [-d REF] [--create] [DST]

push changes to the specified destination

When no destination repository is given, push uses the first non- empty configuration value of:

  1. branch.*.pushRemote, if the source is a branch or is part of only one branch.
  2. remote.pushDefault.
  3. branch.*.remote, if the source is a branch or is part of only one branch.
  4. Otherwise, the remote called origin is used.

If -d is given and begins with refs/, then it specifies the remote ref to update. If the argument passed to -d does not begin with refs/, it is assumed to be a branch name (refs/heads/<arg>). If -d is not given and the source is a ref or part of only one local branch, then the same ref name is used. Otherwise, push exits with a failure exit code. This differs from git, which will consult remote.*.push and push.default. You can imagine this being the most similar to push.default=current.

By default, gg push will fail instead of creating a new ref on the remote. If this is desired (e.g. you are creating a new branch), then you can pass --create to override this check.


allow pushing a new ref
-d ref
-dest ref
destination ref
allow overwriting ref if it is not an ancestor, as long as it matches the remote-tracking branch
do everything except send the changes
-r rev
source revision