目录 搜索
Guides gitattributes giteveryday gitglossary gitignore gitmodules gitrevisions gittutorial gitworkflows Administration git archive git bundle git clean git filter-branch git fsck git gc git instaweb git reflog Basic Snapshotting git add git commit git diff git mv git reset git rm git status Branching and Merging git branch git checkout git log git merge git mergetool git stash git tag Debugging git bisect git blame git grep Email git am git format-patch git request-pull git send-email External Systems git fast-import git svn Getting and Creating Projects git clone git init Git git annotate git archimport git bisect-lk2009 git check-attr git check-mailmap git check-ref-format git checkout-index git cherry git citool git column git credential git credential-cache git credential-store git cvsexportcommit git cvsimport git cvsserver git diff-files git diff-tree git difftool git fast-export git fetch-pack git fmt-merge-msg git get-tar-commit-id git gui git http-backend git http-fetch git http-push git imap-send git index-pack git interpret-trailers git ls-remote git ls-tree git mailinfo git mailsplit git merge-file git merge-index git merge-one-file git merge-tree git mktag git mktree git name-rev git notes git p4 git pack-objects git pack-redundant git pack-refs git parse-remote git patch-id git prune git prune-packed git quiltimport git receive-pack git remote-ext git remote-fd git remote-testgit git repack git replace git rerere git send-pack git sh-i18n git sh-setup git shell git show-branch git show-index git stripspace git unpack-file git unpack-objects git upload-archive git upload-pack git var git verify-commit git verify-tag git whatchanged git worktree Inspection and Comparison git describe git shortlog git show Miscellaneous api credentials api index gitcli gitcore tutorial gitcredentials gitcvs migration gitdiffcore githooks gitk gitnamespaces gitremote helpers gitrepository layout gitsubmodules gittutorial 2 gitweb gitweb.conf pack format User Manual Patching git apply git cherry-pick git rebase git revert Plumbing Commands git cat-file git check-ignore git commit-tree git count-objects git diff-index git for-each-ref git hash-object git ls-files git merge-base git read-tree git rev-list git rev-parse git show-ref git symbolic-ref git update-index git update-ref git verify-pack git write-tree Server Admin git daemon git update-server-info Setup and Config git git config git help Sharing and Updating Projects git fetch git pull git push git remote git submodule
文字

名称

git-cvsexportcommit  - 将一次提交导出到 CVS 签出

概要

git cvsexportcommit [-h] [-u] [-v] [-c] [-P] [-p] [-a] [-d cvsroot]        [-w cvsworkdir] [-W] [-f] [-m msgprefix] [PARENTCOMMIT] COMMITID

描述

将 Git 中的提交导出到 CVS 签出,从而更容易将 Git 存储库中的修补程序合并到 CVS 存储库中。

使用-w开关指定 CVS 签出的名称,或从 CVS 工作副本的根目录执行。在后一种情况下,必须定义 GIT_DIR。看下面的例子。

它尽最大努力去做安全的事情,它会检查 CVS 结帐中的文件是否保持不变并且是最新的,并且默认情况下它不会自动提交。

支持影响二进制文件的文件添加,删除和提交。

如果提交是合并提交,则必须告诉git cvsexportcommit应该对变更集进行的操作。

选项

-c

如果干净地补丁应用,自动提交。如果任何人不能应用或出现其他问题,它将不会提交。

-p

应用补丁时要迂腐(偏执狂)。使用--fuzz = 0调用修补程序

-a

添加作者信息。将作者行和提交者(如果与作者不同)添加到消息中。

-d

设置一个替代的 CVSROOT 使用。这对应于 CVS -d参数。通常用户不想设置它,除非以非对称方式使用 CVS 。

-f

即使文件不是最新的,也强制合并。

-P

强制双亲提交,即使它不是直接双亲。

-m

用提供的前缀预先提交提交消息。用于补丁系列等。

-u

尝试导出之前,从 CVS 存储库更新受影响的文件。

-k

在应用修补程序之前,在工作 CVS 签出时反向 CVS 关键字扩展(例如$ Revision:1.2.3.4 $变为$ Revision $)。

-w

指定用于导出的 CVS 签出的位置。如果当前目录位于 Git 存储库中,则此选项不需要在执行前设置 GIT_DIR。默认值是cvsexportcommit.cvsdir。的值。

-W

告知 cvsexportcommit,当前的工作目录不仅是一个 Git 签出,还包括 CVS 签出。因此,在继续之前,Git 会将工作目录重置为父提交。

-v

Verbose.

组态

cvsexportcommit.cvsdir

用于导出的 CVS 签出的默认位置。

示例

将一个补丁合并到 CVS 中

$ export GIT_DIR=~/project/.git
$ cd ~/project_cvs_checkout
$ git cvsexportcommit -v <commit-sha1>$ cvs commit -F .msg <files>

将一个补丁合并到 CVS 中(-c和-w选项)。工作目录位于 Git Repo 内

        $ git cvsexportcommit -v -c -w ~/project_cvs_checkout <commit-sha1>

自动将待处理的补丁合并到 CVS 中 - 只有在您确实知道自己在做什么的情况下

$ export GIT_DIR=~/project/.git
$ cd ~/project_cvs_checkout
$ git cherry cvshead myhead | sed -n 's/^+ //p' | xargs -l1 git cvsexportcommit -c -p -v
上一篇: 下一篇: