Question

I have a cvs repo with a .git folder. I ran find . -type d \! -name CVS -exec cvs add '{}' \;. Since I have .git in my cvsignore, I assumed it wouldn't add the .git folder. I haven't committed (cvs) yet. What are the consequences of this action? How do I undo the cvs add?

Fwiw, I have to commit this project to cvs and git for work. I realise this sounds like a really stupid procedure, but that's the requirement.

Was it helpful?

Solution

You have carried out a cvs add on a directory. Even though you have not done a cvs commit yet, these directories now permanently live in the repository as CVS creates them immediately. Files behave differently - they only get added to the repository on commit.

CVS itself does not offer any ability to remove directories once they have been added. Unless you add and commit the files in the git directory, there will be no further negative consequences to your repository.

There may be confusion/annoyance though as you will always be shown the contents of your .git directory as "new" files (unless you do update -P - prune empty directories from working copy). Also anyone checking out the module from CVS will get the empty .git directories and may be confused by them.

If any of that sounds like a problem, the following question has some workarounds:

Remove empty directory from CVS?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top