如何在 Eclipse 中备份我的 java 项目?
我是开发新手,我确信这是一个愚蠢的问题,但我不知道应该如何备份我的项目的副本。 当一切正常时,我想保存一个副本/进行备份,这样如果我把所有事情搞砸了,我就能找到一些可以回去的东西,但当然,这不像我通常那样简单地复制文件会为了其他任何事情。抱歉这个愚蠢的问题,但是如果有人能指出我应该如何解决这个问题的正确方向,那就太好了!
I'm new to development and I'm sure this is a silly question but i can't work out how i should be backing-up copies of my project.
When everything's working right i want to save a copy/make a back-up so that if i ever mess everything up i'll have something i can go back to, but of course it's not as simple as just copying a file like i normally would for anything else. Sorry for the silly query, but if someone could point me in the right direction as to how i should go about this that would be great!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
这不是一个愚蠢的问题。你可以备份你的项目目录(只需制作一个副本、zip 等),但我建议你看看版本管理(cvs、subversion、git,无论你喜欢什么)。通过版本管理,您可以返回到任何状态,创建不同的开发分支等......
It's not a silly question. You can back up your project directory (just make a copy, zip, etc) but I would advise you to have a look at version management (cvs, subversion, git, whatever you like). With version management you can go back to any state, create different development branches etc...
版本控制系统非常适合您。 Eclipse 允许将您的存储库克隆到版本控制系统中,例如 CVS、SVN、Mercurial、Clearcase、Git 等。
对我来说,我使用 Mercurial(以前使用 SVN),其 Eclipse 插件可以在 JavaForge 上找到。
A version control system is perfect for you. Eclipse allows to clone your repository into a version control system such as CVS, SVN, Mercurial, Clearcase, Git, etc.
For me, I use Mercurial (previously using SVN), and its Eclipse plugin can be found on JavaForge.
我发现 Mercurial 非常方便。
它不需要服务器,但仍然允许多个开发人员参与同一项目,方法是将程序拆分为两个不同的开发分支,并在完成后将它们合并在一起。
I find Mercurial to be very handy.
It requires no server, but it still allows for multiple developers on the same project by splitting the program into two different branches of development and merging them together when complete.
即使不求助于版本管理,Eclipse 也提供 类似功能:
在首选项中,转到常规 ->工作区 ->当地历史
Even without resorting to a version management, Eclipse provides a similar feature:
in the Preferences, go to General -> Workspace -> Local History
您可以将项目导出为存档并将其保存在某个位置,然后在需要/想要时导入。只需右键单击该项目,选择导出并按照说明进行操作
You can export your project as an archive and just save it somewhere, then import it whenever you need/want to. Just right click on the project, choose export and follow the instructions
版本控制软件通常是最好的选择,它允许您轻松创建分支和浏览修订版本。
如果您使用的是 Windows,则可以使用 VisualSVN 服务器非常快速地设置本地 SVN 存储库。
如果您想要在线存储库,请查看 Google Code(仅限开源)或 Assembla(它们主要提供付费服务,但也提供优质且免费的服务) SVN 或 GIT 存储库)。
Version control software is usually the best option, allowing you to create branches and browse revisions easily.
If you're on Windows, you can set up a local SVN repository using VisualSVN server very quickly.
If you'd want the repository online, have a look at Google Code (only open-source) or Assembla (they mostly offer paid services, but do provide nice and free SVN or GIT repositories).