适用于 Windows 单一开发人员的易于备份的版本控制
我真的需要开始使用源代码控制,因为我会疯狂地跟踪我的代码和修改。
我是一名 Windows 开发人员。我的大部分开发都使用 Eclipse。我的一些项目保存在 wamp/www 文件夹中。其他非 PHP 项目位于一个或多个 Eclipse 工作区中。
我不与其他开发人员一起工作,因此我的需求是不同的:
我需要一些可以让我创建本地存储库的东西。不想依赖外部网站。我需要的是版本控制,而不是外部备份。
轻松备份对我来说真的非常重要。如果我格式化计算机,我需要轻松备份和恢复存储库。我发现这个问题建议使用版本控制称为 Fossil,这对我来说听起来非常有吸引力,因为整个系统是一个 sqlite 文件。这将非常容易备份和恢复,但如果有任何其他知名版本系统可以让我做同样的事情,我更喜欢更知名的东西。
fossil-scm.org/index.html/doc/tip/www/index.wiki
我需要一些最好能与 wamp 配合良好的东西。
我倾向于 git,因为很多人都在谈论它,但我想知道它是否真的适合我。我有一种感觉,这对团队来说是最好的。
I really need to get started with source control because I'm going absolutely crazy keeping track of my code and modifications as it is.
I'm a single developer on Windows. I use Eclipse for most of my development. Some of my projects are saved in wamp/www folder. Other non-PHP projects are in one or more Eclipse workspaces.
I don't work in a team with other developers, so my needs are different this way:
I need something that lets me create a local repository. Don't want to depend on an outside site. What I need is the version control, not the external backup.
Easy backup is really really important to me. I need to easily backup and restore the repository if I format my computer. I found this question that suggests a version control called Fossil which sounds really attractive in my case, because the whole system is a sqlite file. This would be super easy to backup and restore, but I'd prefer to something a little more well-known if there's any other well-known version systems that let me do the same thing.
fossil-scm.org/index.html/doc/tip/www/index.wiki
I need something that would preferably play nice with wamp.
I'm leaning on the side of git because a lot of people talk about it, but I wonder if it's really the right thing for me. I have a feeling it's best for teams.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
如果您需要图形界面,请尝试 Perforce。免费版本具有完整版本的所有功能,但您仅限于一定数量的帐户。
If you were after a graphical interface, try Perforce. The free version has all the features of the full version except you're limited to a certain number of accounts.
Git 在过去几年中取得了巨大的发展势头。我敢打赌,您选择 git 是基于大量的评论和评论。但这对于单个开发人员来说有点过大了。
我想说颠覆最适合你。
备份命令是'svnadmin dump>文件名.svn
恢复命令是 svnadmin load
如果您打算使用 wiki 及其附带的缺陷跟踪功能,Fossil 也非常好。
Git has gained a lot of momentum over the past few years. I bet you choose git based on the avalanche of reviews and comments. But its an overkill for a single developer.
I would say subversion would suit you the best.
The backup command is 'svnadmin dump > filename.svn
The restore command is svnadmin load
Fossil is also very good if you are going to use the wiki and the defect tracking that comes with it.
Git、Mercurial 和 Bazaar 听起来都可能满足您的需求。它们都将存储库的内容存储在单个文件夹中(例如,Git 位于
.git
文件夹中),这使得它们的备份相当简单 - 只需将该文件夹复制到备份介质即可。Git, Mercurial, and Bazaar all sound like they could potentially suit your needs. All of them store the contents of the repository in a single folder (for instance, Git in a
.git
folder), which makes them fairly simple to back up - just copy that folder to your backup medium.如果您有第二台机器、外部驱动器或可安装的异地位置,则可以使用 git 或 Mercurial 来实现强大的源代码控制和超级简单的备份。
我发现 Mercurial 比 git 更容易学习,不过我会在这里使用 git 作为示例,因为这是我习惯的。
(现在您拥有源代码控制系统的两份副本!如果丢失一份,您还拥有另一份)。您可以转到备份 .git 文件夹并输入“git log”来检查您的提交是否存在。
让我们将它们连接起来,以便镜像可以轻松保持同步:
现在,在进行并提交更改后,将它们发送到您的备份:
If you have a second machine, an external drive, or a mountable offsite location, you can use git or mercurial for powerful source control and super-easy backups.
I found mercurial a little easier to learn that git, nevertheless I'll use git as an example here since that's what I'm used to.
(now you have two copies of your source code control system! If you lose one, you have the other). You can go to the backup .git folder and type 'git log' to check your commits are there.
Let's hook them up so the mirror can easily be kept in sync:
Now after making and committing changes, send them to your backup with:
git 非常容易备份。该存储库是完全独立的,可以复制到另一台计算机或刻录到 DVD。恢复就像将存储库复制回本地计算机一样简单。
git is very easy to backup. The repository is completely self-contained and can be copied to another machine or burned to DVD. Restoring is as simple as copying the repo back to your local machine.
我认为
Mercurial
优于TortoiseHg
对于 SCM 新手来说将是一个非常好的开始(是的,我知道git
也很棒,但恕我直言对于新手来说太难了)I think that
Mercurial
overTortoiseHg
would be a very nice start for novice in SCMs (yes, i know thatgit
is wonderful too, but imho it is too difficult for novice)Fossil 的强大优势之一是它是为“低调的仪式”而设计的。您不需要做太多的配置,数据库文件本身可以保存在本地,而且它基本上不会妨碍您。
我已经在一些项目中使用了它,这些项目大多是单一原则开发人员,并且我对它非常着迷。
它的用户社区很小,部分原因是它没有太多公开的营销或传播。但该社区通过其邮件列表的快速响应弥补了营销方面的不足。
但它也是SQLite背后的版本控制,因此它既是SQLite数据库文件的使用者,也是SQLite实现的重要支撑工具。
即使对于单个用户,利用存储库的轻松复制也是提供备份的好方法。使用最少的 CGI 配置将您的存储库隐藏在第二台计算机上,您可以自动同步您的工作并进行实时备份。将该机器放在朋友家里或便宜的网络主机上,您就拥有了异地备份。
编辑:
查看化石主页 是一个很好的起点。任何存储库都可以通过内置的Web 界面< /a> 允许访问时间线、票务系统、wiki 和项目设置。它还可用于查看签入存储库的文档。事实上,化石网站上所有页面的链接都是由化石副本提供的。
有一本草稿形式的不错的书,介绍了使用化石进行研究的过程合理规模的项目中的常见任务。
SQLite 源代码存储库 也由化石维护,其 Web 界面由以下副本提供服务化石也是如此。所有 SQLite 存储库和化石存储库通过定期执行化石同步命令的 cron 作业在多个地理上分离的服务器之间保持同步。
获取具有丰富历史的存储库的一种简单方法是将源克隆到化石本身。为此,请将化石可执行文件的副本放在您的 PATH 中,然后放在某个空文件夹中,比如
您现在站在一个开放的化石存储库中,其中包含化石的完整源代码和修订历史记录。有了 GCC、awk 和 zlib,您应该能够从源代码构建它。 (根据我的经验,在 Windows 上,从 MSYS bash 提示符使用 MinGW 进行构建是最简单的。)
您可以定期执行
fossil update
以使您的克隆保持最新状态,我建议您尝试fossil ui
查看 Web 界面的全部功能以及对克隆的管理访问权限。One of fossil's strong advantages is that it was designed for "low ceremony". You don't have to do much configuration of anything, the database file itself can be kept locally, and it mostly just stays out of the way.
I've been using it on a handful of projects that are mostly single-principle-developer and am becoming quite attached to it.
It has a small user community partially because it hasn't had much overt marketing or evangelism. But that community makes up for its lack of marketing by being very responsive on its mailing list.
But it is also the version control standing behind SQLite, so it is both a user of SQLite for its database file, as well as an important supporting tool for SQLite's implementation.
Even for a single user, taking advantage of the ease of replication of a repository is a good way to provide a backup. Hide your repositories on a second machine with a minimal amount of CGI configuration and you can autosynch your work and have a live backup. Put that machine in a friend's house or at an inexpensive webhost and you have an offsite backup.
Edit:
See the fossil homepage for a good starting point. Any repository can be viewed via the built-in web interface which allows access to the timeline, ticket system, wiki, and project settings. It also can be used to view documents that are checked into the repository. In fact, all links to pages at the fossil web site are being served by a copy of fossil.
There is a decent book in draft form that walks through the process of using fossil for common tasks in a reasonably sized project.
The source repository for SQLite is also maintained by fossil, and its web interface is served by a copy of fossil as well. All the SQLite repositories and the fossil repository are kept synchronized among several geographically separated servers by cron jobs that do periodic
fossil sync
commands.One easy way to get a hold of a repository with a rich history to play around with is to clone the source to fossil itself. To do this, put a copy of the fossil executable in your PATH, then in an empty folder somewhere say
You are now standing in an open fossil repository containing the complete source code and revision history of fossil. With GCC, awk, and zlib available, you should be able to build it from source. (On Windows, it is easiest to build with MinGW from an MSYS bash prompt in my experience.)
You can periodically do
fossil update
to keep your clone current, and I recommend you tryfossil ui
to see the full power of the web interface with administrative access to your clone.