Progress:
TIER 2 · MODULE 31· Intermediate

git cvsexportcommit

One-way bridge for the holdouts.

🎯 What & why

git cvsexportcommit takes a single Git commit and replays it onto a CVS working copy so it can be cvs commit-ed. It exists for teams forced to keep CVS as the system of record.

🧠 Mental model

Think of it as a patch courier: it generates a diff for one Git commit, applies it inside a CVS checkout, and optionally runs cvs commit with the same log message.

🛠️ Synopsis

    git cvsexportcommit [-h] [-u] [-w cvsworkdir] [-W] [-p] [-v]
                        [-c] [-f] [-a] [-m msgprefix]
                        [parent-commit] commit-id

Requires a CVS working directory checked out somewhere on disk;
specify it with -w or use -W to reuse the current Git work tree.

🎚️ Switches & options

FlagWhat it does
-cAfter applying, run cvs commit automatically
-pApply the patch with git apply --3way for cleaner merges
-vVerbose; show the diff and apply progress
-uRun cvs update on the work dir before applying
-w <dir>Path to the CVS working directory to apply the commit into
-WUse the current Git work tree as the CVS work dir (advanced)
-f⚠️ Force the commit even if the tree is dirty or differs

💡 Use cases

🧪 Examples

Preview a commit against a CVS work dir
git cvsexportcommit -v -w /srv/cvswork/myproj HEAD
Update CVS, apply with 3-way, then commit
git cvsexportcommit -u -p -c -w /srv/cvswork/myproj HEAD
Export a specific commit by SHA
git cvsexportcommit -v -c -w /srv/cvswork/myproj 9f1c2ab^ 9f1c2ab
Use the Git work tree itself as the CVS work dir
git cvsexportcommit -W -c HEAD

🎓 Recommendations

🪤 Common pitfalls

🔗 Related modules

📝 Quiz

Hit each option, then Check answers. Score is recorded; Next is always open.