What are your best practices and tips for using git to interface with a CVS repository?
相关问题
- Why does recursive submodule update from github fa
- Extended message for commit via Visual Studio Code
- Emacs shell: save commit message
- Can I organize Git submodules in a flat hierarchy?
- Upload file > 25 MB on Github
相关文章
- 请教Git如何克隆本地库?
- GitHub:Enterprise post-receive hook
- Git Clone Fails: Server Certificate Verification F
- SSIS solution on GIT?
- Is there a version control system abstraction for
- ssh: Could not resolve hostname git: Name or servi
- Cannot commit changes with gitextensions
- git: retry if http request failed
If the upstream is 100% in CVS (e.g., OpenBSD, or many of its subprojects like mdocml or ports-readmes), and especially if it's as rusty as the OpenBSD CVS tree is (e.g., occasionally even having history rewrite), I find it quite useful to simply commit the underlying
CVS/{Entries,Repository,Root}
files directly into mygit
repository.This makes it very easy to not have to have multiple independent workspaces, make it possible to checkout with
git
on any machine, and thencvs up
in place, orcvs diff
to generate correct CVS patches for mailing to the git-less maintainers upstream.I wrote up the details of my own workflow for remote CVS, local Git
Slightly meta-answer. If you are forced to use git 'guerilla style', i.e. your company is stuck using cvs for the version control and you use git on your workstation to make life easier, you might consider doing something like this;
Calling this file 'cvs' and including it the path before the real CVS command. Otherwise you can have git commits older than the cvs ones, which isn't that useful...
I've only worked with Git-CVS interactions to demo Git for a friend, but it was very straightforward.
cvsps
.Git cvsimport
uses this to access CVS history.We found that, for a large project, inital set-up was much faster by taking a full copy of the CVS repo onto your computer, and doing the
git cvsimport
locally:Note that the -x after -p is very important. This passes -x to cvsps. For more information please see the cvsps man page.
I wrote up an answer to a similar question here.
This works suprisingly well when you're forced to continue to push changes into a central CVS repository.