简体   繁体   English

CVS忽略.git文件夹

[英]CVS ignores .git folder

I was trying to synchronize my local git repository to a CVS repository and everything gets synchronized properly, except for the .git folder. 我试图将我的本地git存储库同步到CVS存储库,并且除了.git文件夹之外,所有内容都已正确同步。

At first, I thought all folders starting with a dot would be ignored, so I tried adding a .test folder and putting mock files in it. 最初,我认为所有以点开头的文件夹都将被忽略,因此我尝试添加.test文件夹并将模拟文件放入其中。 To my surprise, it is detected as a new folder, and the files inside of it are listed and ready to be synchronized. 令我惊讶的是,它被检测为新文件夹,并且其中的文件被列出并准备进行同步。

How do I make CVS sync the .git folder? 如何使CVS同步.git文件夹? Thank you. 谢谢。

PS I use git locally to keep track of individual changes, and CVS for major milestones. PS:我在本地使用git来跟踪个人更改,并使用CVS进行主要里程碑操作。 They don't have to be linked in any form. 它们不必以任何形式链接。

You definitely do not want the .git folder itself to be synced "as is" to your CVS repository. 您绝对不希望将.git文件夹本身“按原样”同步到CVS存储库。

When using git, the .git folder contains the version information, eg the content of all versions of all files in the repository (in a compressed format). 使用git时, .git文件夹包含版本信息,例如,存储库中所有文件的所有版本的内容(压缩格式)。

When you are syncing, the information in .git is used to populate the version control information in CVS. 同步时, .git的信息用于填充CVS中的版本控制信息。 But CVS cannot read the information in the .git folder directly. 但是CVS无法直接读取.git文件夹中的.git

Syncing content of .git so that it would be visible in CVS would only be confusing (and dangerous if you tried to "sync back" that content to git, overwriting the contents of the .git folder in git). 同步.git内容,使其在CVS中可见,只会造成混乱(如果尝试将该内容“同步”回git,并覆盖git中的.git文件夹的内容,这将很危险)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM