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

# cg-fetch(1)

fetch changes from a remote branch to the local repository

## NAME

cg-fetch - fetch changes from a remote branch to the local repository

## SYNOPSIS

cg-fetch \[-f\] \[-v\] \[BRANCH\_NAME\].sp

## DESCRIPTION

Takes the branch name as an argument, defaulting to *origin*..sp This will fetch the latest changes from a remote repository to the corresponding branch in your local repository. Note that this operation does not involve merging those changes to your own branch - that is being done by the [**cg-merge**(1)](/cg-merge/1.md) command. [**cg-update**(1)](/cg-update/1.md) exists to conveniently bundle the act of fetching and merging to your working branch together..sp Before the first fetch, you have to tell Cogito about the remote branch. This should be done by the [**cg-branch-add**(1)](/cg-branch-add/1.md) command. See its documentation for the list of supported fetching protocols and other details. Note that one exception to this is the *origin* branch, which was set to the location of the source repository if you created yours using the [**cg-clone**(1)](/cg-clone/1.md) command..sp Note that the operation now being performed by [**cg-fetch**(1)](/cg-fetch/1.md) (*fetching*) was called *pulling* in the past. However, GIT recently changed this terminology, and after sufficient transition period, the *pulling* expression will be instead used for the operation now performed by the [**cg-update**(1)](/cg-update/1.md) command. Please do not let this confuse you..sp

## OPTIONS

- \-f

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

- \-v

  Display more verbose output - most notably list all the files touched by the fetched changes. Use twice to get even more verbosity, that is raw progress information instead of the progress bar.

- \-h, --help

  Print usage summary.

- \--long-help

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

## ENVIRONMENT

RSYNC

The command to invoke when we want to call the rsync tool (only used when fetching over the rsync protocol). Defaults to *rsync*.

RSYNC\_FLAGS

Additional flags to be passed to the rsync tool when fetching over the rsync protocol.

## COPYRIGHT

Copyright © Petr Baudis, 2005..sp

## SEE ALSO

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