SYNOPSIS

cg-push [-f] [-r LOCAL_BRANCH] [-t TAG]… [REMOTE_BRANCH]…

DESCRIPTION

It will push your commits on the current branch (or as specified by the -r option) to one or more remote repositories, provided that your commits follow the last commit in each of the remote repositories.

Note that if a remote repository is associated with a working tree copy, this command won't update that. Use cg-reset at the remote side to bring it in sync (but throw away any local changes in that tree). Consider setting up a standalone repository (see cg-admin-setuprepo(1)).

You can set up update hooks in the remote repository to bind any action to the push (e.g. sending an email or CIA notification or even verifying if the commits are well-formed before letting them in). See git-receive-pack(1) documentation for details.

Takes the branch names as arguments, defaulting to origin or the current branch's default remote branch, see cg-fetch(1) for details.

OPTIONS

-f

Force the push even if the fast-forward check fails, that is, the commit you are pushing is not a descendant of the current commit in the remote branch. DO NOT USE THIS FLAG - that error usually means that someone else pushed out some commits in the meantime and you should do cg-update(1) in order to get them merged locally, then try to push again.

You might want to use this flag only if you had to rewrite your history (e.g. using cg-admin-uncommit(1) or cg-commit --amend) and now you want to push the new history out. However if you published your original commits in the meantime, you are now setting up quite some trouble for others who track your repository since Git will get confused. Use with care.

-r BRANCH

Pushes the given branch instead of the current one. Note that we lie a little here and you can actually specify a particular commit here, but you probably will not want to do that.

-t TAG

Tells cg-push to also push the given tag. Note that in the future, cg-push should push tags automatically. Also note that even if you pass cg-push(1) the -t arguments, your HEAD is still pushed as well in addition to the tags.

-h, --help

Print usage summary.

--long-help

Print user manual. The same as found in cg-push(1).

--version

Print Cogito version.

COPYRIGHT

Copyright © Petr Baudis, 2005.

SEE ALSO

cg-push is part of cogito(7), a toolkit for managing git(7) trees.