LinuxCommandLibrary

git-cvsexportcommit

Export a single Git commit as a CVS patch

TLDR

Merge a specific patch into CVS

$ git cvsexportcommit -v -c -w [path/to/project_cvs_checkout] [commit_sha1]
copy

SYNOPSIS

git cvsexportcommit [-p] [-c <commit-id>] [-u <updates-file>] [-w <changes-file>] [-v] [<commit-id>|head]

PARAMETERS

-c <commit-id>
    Commit to export. Defaults to HEAD.

-p
    Generate patches instead of updating files directly.

-u <updates-file>
    File for updates list. Mutually exclusive with -p.

-w <changes-file>
    File for changes list. Mutually exclusive with -p.

-v
    Enable verbose output.

DESCRIPTION

git-cvsexportcommit exports a single commit from a Git repository into a checked-out CVS working tree. It identifies changes (added, modified, or deleted files) in the specified commit and applies them to the CVS directory, preparing it for a cvs commit.

This command is useful for Git-CVS interoperability, such as during migrations or dual-maintenance workflows. By default, it directly updates files in the working tree using CVS metadata like CVS/Entries and CVS/Repository. The -p option generates patches instead, allowing manual application.

It can also produce -u updates files (listing files to update) or -w changes files (detailing modifications), useful for automation. Verbose mode (-v) logs actions. The command targets a specific commit via -c or positional argument, defaulting to HEAD.

Run from a CVS checkout root; it does not execute cvs commit itself.

CAVEATS

Must run from CVS checkout root. Does not perform cvs commit; commit manually. Legacy tool; CVS is obsolete.

WORKFLOW

Typically: checkout CVS tree, git cvsexportcommit, edit log if needed, cvs commit.

HISTORY

Added in early Git (pre-1.0) for CVS migration support. Usage declined with CVS obsolescence; minimally maintained.

SEE ALSO

git-cvsimport(1), cvs(1)

Copied to clipboard