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

# cg-mv(1)

rename or move files in the repository

## NAME

cg-mv - rename or move files in the repository

## SYNOPSIS

cg-mv \[-f\] FILE... DEST.sp

## DESCRIPTION

Takes either two filenames and removes a file from the first one to the second one, or a list of filenames and a dirname and moves all the files to the directory. The changes will be executed in your working tree immediately, but recorded to the repository only at the time of the next commit..sp Note that so far, GIT/Cogito does not track file renames/moves per se. Therefore, doing [**cg-mv**(1)](/cg-mv/1.md) is currently the same as doing [**cg-rm**(1)](/cg-rm/1.md), [**cg-add**(1)](/cg-add/1.md) from the Cogito perspective, and no special information is recorded that the file moved around. When any rename tracking gets involved currently, it is purely heuristical method executed at the time of examination..sp

## OPTIONS

- \-f

  Remove the target file if it already exists.

- \-h, --help

  Print usage summary.

- \--long-help

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

## COPYRIGHT

Copyright © Petr Baudis, 2005.sp

## SEE ALSO

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