我该如何处理新安装的 subversion
所以我已经安装了 subversion,并且对它非常陌生,实际上大约有 2 个小时的新时间。
我使用它是因为我想跟踪对我的网站所做的更改。
我有一个站点文件夹,我在其中保存我的网站文件,它有几个用于实际站点的页面,然后是所有图像和 css 样式表等。
首先,我提交添加并提交所有文件(php、html、css 和图片)到 svn 存储库或只是(php 和 html)或(php、html 和 css)。我真的很困惑什么是最佳实践以及其他人做什么。
如果我必须上传所有内容,例如图像和所有内容,那么对于我对网站所做的每次更新,我是否会再次上传所有文件,还是只上传我更新的文件?
So I have installed subversion and am extremely new to it, about 2 hours new in fact.
I am using because I want to track changes made to my website.
I have a site folder where I keep my website files and it has a few pages used for the actual site and then all the images and css stylesheets etc.
At first do I commit add and commit all the files (php, html, css and images) to the svn repository or just the (php and html) or (php, html and css). Im really confused with this as to whats the best practice and what everyone else does.
If I have to upload everything, so images and all, then for every update I do to my site, do I then upload all my files again, or just the file I updated?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以添加项目的所有文件并提交它们。一般规则是,构建过程中可以“构建”、“生成”等的任何内容都不会签入存储库。
然后,当您进行修改并提交时,只有修改会添加到存储库中。这些文件不是一次又一次添加的。当然,当您将新文件添加到存储库时,也会添加新文件。
一件事是您必须考虑如何移动/重命名文件。使用 svn cp 或 svn move 或适当的命令进行操作,以便 SVN 识别出移动/重命名/复制的是同一个文件,并且不会再次添加该文件。
You can add all the files for your project and commit them. General rule is that anything that can be "built", "generated" etc by your build process is not checked in to the repo.
Then as you make modifications and commit, it is only the modifications that are added to the repo. The files are not a added again and again. New files, are of course, added when you add them to the repo.
One thing is that you have to consider how you move / rename the files. Use
svn cp
orsvn move
or appropriate commands for the operations so that SVN recognizes that it is the same file moved / renamed / copied and will not add the file again.