---
name: "cg-update"
section: "1"
platform: "linux"
package: "cogito"
version: "0.18.2-1"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/cg-update"
---

# cg-update(1)

fetch and merge changes from a remote repository

## NAME

cg-update - fetch and merge changes from a remote repository

## SYNOPSIS

cg-update \[-f\] \[--squash\] \[-v\] \[BRANCH\_NAME\].sp

## DESCRIPTION

Takes the branch name as an argument, defaulting to *origin*..sp This is similar to running cg-fetch and cg-merge commands successively. Please refer to the documentation of those commands for more details about the operation. Note that if you are not doing own development but only following some project, it is recommended to use this command instead of [**cg-fetch**(1)](/cg-fetch/1.md) + [**cg-merge**(1)](/cg-merge/1.md) since [**cg-update**(1)](/cg-update/1.md) can handle some additional corner cases (in particular, if the remote branch rebases, [**cg-update**(1)](/cg-update/1.md) will fast-forward instead of doing a tree merge and diverging)..sp Note that in the GIT newspeak, the operation being performed by cg-update is now called *pull*, even though in the past, *pull* was the name for the operation being now done by cg-fetch, which is even still aliased to cg-pull. Please do not let this confuse you. (Cogito won't call this *update* operation *pull*, since about everyone but GIT and BK users uses it in the *fetch* meaning.).sp

## OPTIONS

- \-f

  Force the complete fetch even if the heads are the same.

- \--squash

  "Squash" merge - condense all the to-be-merged commits to a single merge commit. This is not to be used lightly; see the cg-merge documentation for further details.

- \-v

  Display more verbose output - most notably list all the files touched by the pulled changes.

- \-h, --help

  Print usage summary.

- \--long-help

  Print user manual. The same as found in [**cg-update**(1)](/cg-update/1.md).

## ENVIRONMENT

CGFETCH\_FLAGS

Additional flags to pass cg-fetch (useful e.g. for -v -v).

## COPYRIGHT

Copyright © Petr Baudis, 2005.sp

## SEE ALSO

cg-update is part of [**cogito**(7)](/cogito/7.md), a toolkit for managing [**git**(7)](/git/7.md) trees..sp
