Documentation / git-cvsexportcommit.txton commit git-cvsserver runs hooks/post-receive (cdf6328)
   1git-cvsexportcommit(1)
   2======================
   3
   4NAME
   5----
   6git-cvsexportcommit - Export a single commit to a CVS checkout
   7
   8
   9SYNOPSIS
  10--------
  11'git-cvsexportcommit' [-h] [-u] [-v] [-c] [-P] [-p] [-a] [-d cvsroot] [-w cvsworkdir] [-f] [-m msgprefix] [PARENTCOMMIT] COMMITID
  12
  13
  14DESCRIPTION
  15-----------
  16Exports a commit from GIT to a CVS checkout, making it easier
  17to merge patches from a git repository into a CVS repository.
  18
  19Specify the name of a CVS checkout using the -w switch or execute it
  20from the root of the CVS working copy. In the latter case GIT_DIR must
  21be defined. See examples below.
  22
  23It does its best to do the safe thing, it will check that the files are
  24unchanged and up to date in the CVS checkout, and it will not autocommit
  25by default.
  26
  27Supports file additions, removals, and commits that affect binary files.
  28
  29If the commit is a merge commit, you must tell git-cvsexportcommit what parent
  30should the changeset be done against.
  31
  32OPTIONS
  33-------
  34
  35-c::
  36        Commit automatically if the patch applied cleanly. It will not
  37        commit if any hunks fail to apply or there were other problems.
  38
  39-p::
  40        Be pedantic (paranoid) when applying patches. Invokes patch with
  41        --fuzz=0
  42
  43-a::
  44        Add authorship information. Adds Author line, and Committer (if
  45        different from Author) to the message.
  46
  47-d::
  48        Set an alternative CVSROOT to use.  This corresponds to the CVS
  49        -d parameter.  Usually users will not want to set this, except
  50        if using CVS in an asymmetric fashion.
  51
  52-f::
  53        Force the merge even if the files are not up to date.
  54
  55-P::
  56        Force the parent commit, even if it is not a direct parent.
  57
  58-m::
  59        Prepend the commit message with the provided prefix.
  60        Useful for patch series and the like.
  61
  62-u::
  63        Update affected files from CVS repository before attempting export.
  64
  65-w::
  66        Specify the location of the CVS checkout to use for the export. This
  67        option does not require GIT_DIR to be set before execution if the
  68        current directory is within a git repository.
  69
  70-v::
  71        Verbose.
  72
  73EXAMPLES
  74--------
  75
  76Merge one patch into CVS::
  77+
  78------------
  79$ export GIT_DIR=~/project/.git
  80$ cd ~/project_cvs_checkout
  81$ git-cvsexportcommit -v <commit-sha1>
  82$ cvs commit -F .msg <files>
  83------------
  84
  85Merge one patch into CVS (-c and -w options). The working directory is within the Git Repo::
  86+
  87------------
  88        $ git-cvsexportcommit -v -c -w ~/project_cvs_checkout <commit-sha1>
  89------------
  90
  91Merge pending patches into CVS automatically -- only if you really know what you are doing::
  92+
  93------------
  94$ export GIT_DIR=~/project/.git
  95$ cd ~/project_cvs_checkout
  96$ git-cherry cvshead myhead | sed -n 's/^+ //p' | xargs -l1 git-cvsexportcommit -c -p -v
  97------------
  98
  99Author
 100------
 101Written by Martin Langhoff <martin@catalyst.net.nz> and others.
 102
 103Documentation
 104--------------
 105Documentation by Martin Langhoff <martin@catalyst.net.nz> and others.
 106
 107GIT
 108---
 109Part of the gitlink:git[7] suite