I have a project I need to be working on from two different computers, at work and at home. I need to be able to work on the code from both computers, so the issue is two fold;
我有一个项目,我需要在两台不同的计算机上工作,无论是在工作还是在家里。我需要能够处理来自两台计算机的代码,所以这个问题有两个问题;
- Sharing the code
- Sharing the workspace.
共享代码
共享工作区。
1 is simple enough with svn; but I feel icky committing broken code to svn just so I can access that again from home. I can live with this but is there a better option?
用svn很简单1;但我觉得icky将破碎的代码提交给svn只是为了让我可以在家里再次访问它。我可以忍受这个但是有更好的选择吗?
To elaborate more on 2. I have a highly customized eclipse setup on one of the computers where I spent hours adding plugins and tweaking every tiny config options I could access to get it to the point where it is just right. It'll be a pain redoing every single change on the other computer, is there some way to automatically sync that? I know I can export preferences from Eclipse and import them, but I don't want to have to manually do that each time I change something. [Also, I don't think exporting preferences also exports perspectives?]
详细说明2.我在其中一台计算机上有一个高度自定义的eclipse设置,我花了几个小时添加插件并调整我可以访问的每个微小配置选项,以使其达到恰到好处的程度。在另一台计算机上重做每一次更改都会很痛苦,有没有办法自动同步?我知道我可以从Eclipse导出首选项并导入它们,但我不希望每次更改某些内容时都必须手动执行。 [另外,我不认为出口偏好也会出口观点?]
Both computers run windows.
两台电脑都运行窗户。
9 个解决方案
#1
Portable Development Environment
便携式开发环境
Not that you'd want to run from a USB flash drive, but you can bundle Eclipse and the JDK all in one directory, as described here, to have a nicely self-contained development environment:
并不是说您想要从USB闪存驱动器运行,但是您可以将Eclipse和JDK捆绑在一个目录中,如此处所述,以获得一个非常独立的开发环境:
- How-to: Run Eclipse or Aptana from USB Drive
操作方法:从USB驱动器运行Eclipse或Aptana
You can toss in a few more tools too if needed:
如果需要,您也可以投入更多工具:
- How-to: Free Portable Web Development on a USB Drive
- *: Development tools for a USB drive
- ServerFault: Tools that fit on a USB drive
操作方法:USB驱动器上的免费便携式Web开发
*:USB驱动器的开发工具
ServerFault:适合USB驱动器的工具
See PortableApps for additional tools, including one that will put a menu in your system tray giving you quick access to all your portable tools.
有关其他工具的信息,请参阅PortableApps,其中包括将菜单放入系统托盘中,以便您快速访问所有便携式工具。
Once you've got that set up, then use an option like one of the following to share the directory across workstations:
完成设置后,使用以下选项之一的选项在工作站之间共享目录:
External Hard Drive
外置硬盘
A flash drive would be too slow, but often an external HDD is fine. Of course, you've got to lug it around. And it's no fun when you forget to bring it to work one day--as I did my laptop yesterday. :-) Drive letter changes can be another problem.
闪存驱动器太慢,但通常外置硬盘驱动器很好。当然,你必须把它拉出来。当你有一天忘记把它带上班的时候也没那么有趣 - 就像昨天我的笔记本电脑一样。 :-)驱动器号更改可能是另一个问题。
Mirroring Tools
A mirroring/backup tool is simple but error-prone. These are one-way tools, in that they copy everything from one workstation to another. The risk is that you make changes at one workstation, forget to run the tool, then change the same file(s) at your other workstation, and run the tool, overwriting your changes.
镜像/备份工具很简单但容易出错。这些是单向工具,因为它们将所有工作从一个工作站复制到另一个工作站。风险在于您在一个工作站上进行更改,忘记运行该工具,然后在其他工作站上更改相同的文件,然后运行该工具,覆盖您的更改。
- rsync
- DeltaCopy
Synchronization Tools
A step up from a mirroring tool would be a syncronization tool. These detect changes and allow you to make choices about merging. You have to remember to run it manually, or use another tool to schedule it to run at certain times.
从镜像工具升级将是同步工具。这些检测更改并允许您选择合并。您必须记住手动运行它,或使用其他工具安排它在特定时间运行。
Synchronization Services
These are services that automatically sync files between workstations. Most, if not all of them handle conflicts, and allow access to previous versions of files. They are nice because they are set-and-forget. You don't have to remember to run a mirror or sync tool. Also, these eliminate the need to leave one workstation powered up so that you can manually sync to it when you get to the other workstation.
这些是在工作站之间自动同步文件的服务。大多数(如果不是全部)处理冲突,并允许访问以前版本的文件。他们很好,因为他们一劳永逸。您不必记住运行镜像或同步工具。此外,这些消除了将一个工作站启动的需要,以便您在到达另一个工作站时可以手动同步到它。
- Dropbox (One quirk here for users of Instant Rails is that the space in the "My Dropbox" folder name is a show stopper.)
- SpiderOak
- Syncplicity
- Windows Live Sync
Dropbox(Instant Rails用户的一个怪癖是“我的Dropbox”文件夹名称中的空格是一个显示停止。)
Windows Live Sync
#2
I have just tried out the recently announced workspace mechanics plugin. It seems to be made exactly for the second part of the question.
我刚刚尝试了最近发布的工作区机制插件。它似乎完全是针对问题的第二部分。
You will need to provide a directory where the preferences are to be stored (by default ~/.eclipse/mechanic
). With the plugin installed, preferences can be easily exported to separate files. If you start a new workspace and point the plugin to the right directory (or leave the default), a dialog is displayed that lets you choose what settings to apply to the current workspace.
您需要提供一个存储首选项的目录(默认情况下为〜/ .eclipse / mechanic)。安装插件后,可以轻松将首选项导出到单独的文件中。如果启动新工作区并将插件指向正确的目录(或保留默认目录),则会显示一个对话框,您可以选择要应用于当前工作区的设置。
#3
In regards to problem #1, I use Dropbox and have been very happy with it.
关于问题#1,我使用Dropbox并对它非常满意。
I did notice one problem opening a project after being updated on another machine: Eclipse picks up changes in existing files but does not automatically add new files. This is resolved by simply right clicking the project and selecting 'Refresh'.
我确实注意到在另一台机器上更新后打开一个项目有一个问题:Eclipse获取现有文件中的更改但不会自动添加新文件。只需右键单击项目并选择“刷新”即可解决此问题。
#4
To followup on this, i've been using Pulse with some success poweredbypulse.com. Its not the ideal solution but it's been working pretty well for me so far.
为了跟进这一点,我一直在使用Pulse,并取得了一些成功的powerbypulse.com。它不是理想的解决方案,但到目前为止它一直很好用。
#5
Regarging #1, I've thought about this too. Microsoft's TFS has a "shelve" feature which does what you want (store pending changes on the server without committing). It's kind of like a personal branch.
重新定位#1,我也考虑过这个问题。微软的TFS有一个“搁置”功能,可以满足您的需要(在未提交的情况下在服务器上存储待处理的更改)。这有点像个人分支。
In subversion I would probably create a branch for my bleeding-edge, maybe-broken code, and just merge to trunk periodically.
在subversion中,我可能会为我的前沿,可能破坏的代码创建一个分支,并且只是定期合并到trunk。
#6
I utilize rsync to do a similar thing between my laptop(OSX) and desktop(linux).
我利用rsync在笔记本电脑(OSX)和桌面(linux)之间做类似的事情。
A quick google search mentions rsync is available for windows - so this may be an option for you.
快速谷歌搜索提到rsync可用于Windows - 所以这可能是一个选项。
You can probably set this up to be set on a schedule by your OS. I personally have it set up for when I access my office network or when files are changed.
您可以将其设置为由您的操作系统按计划设置。我亲自为我访问办公室网络或更改文件时设置了它。
#7
Eclipse and most other java tools are easily portable.
Eclipse和大多数其他Java工具都很容易移植。
You can copy the them to a thumb drive and run them on any machine. For the JDK it needs to have a similar OS.
您可以将它们复制到拇指驱动器并在任何计算机上运行它们。对于JDK,它需要具有类似的操作系统。
I have a "C:\Development" folder with eclipse, java, jboss, workspace, ant, maven, svn, etc.. which I can unzip and drop in C: on any windows machine and run my environment.
我有一个带有eclipse,java,jboss,workspace,ant,maven,svn等的“C:\ Development”文件夹。我可以在任何Windows机器上解压缩并放入C:并运行我的环境。
I don't run it off the thumb drive because you never know which letter the drive will get and some of the references eclipse keeps are fully qualified.
我不会从拇指驱动器上运行它,因为你永远不知道驱动器会得到哪个字母,并且eclipse保留的一些引用是完全合格的。
#8
You might consider using Pulse. Its free and its great for generating a standard Eclipse installation that includs all your plugins and workspace settings (if you use the freelance version - not free). Its nice to be able to generate one working Eclipse configuration and then repeat that same profile installation on another computer OR share that profile with an entire team.
您可以考虑使用Pulse。它是免费的,它非常适合生成标准的Eclipse安装,包括所有插件和工作区设置(如果你使用*版本 - 不是免费的)。很高兴能够生成一个正在运行的Eclipse配置,然后在另一台计算机上重复相同的配置文件安装,或者与整个团队共享该配置文件。
#9
Or simply Remote Desktop into your preferred computer from the other.
或者只是远程桌面从另一台计算机进入您的首选计算机
#1
Portable Development Environment
便携式开发环境
Not that you'd want to run from a USB flash drive, but you can bundle Eclipse and the JDK all in one directory, as described here, to have a nicely self-contained development environment:
并不是说您想要从USB闪存驱动器运行,但是您可以将Eclipse和JDK捆绑在一个目录中,如此处所述,以获得一个非常独立的开发环境:
- How-to: Run Eclipse or Aptana from USB Drive
操作方法:从USB驱动器运行Eclipse或Aptana
You can toss in a few more tools too if needed:
如果需要,您也可以投入更多工具:
- How-to: Free Portable Web Development on a USB Drive
- *: Development tools for a USB drive
- ServerFault: Tools that fit on a USB drive
操作方法:USB驱动器上的免费便携式Web开发
*:USB驱动器的开发工具
ServerFault:适合USB驱动器的工具
See PortableApps for additional tools, including one that will put a menu in your system tray giving you quick access to all your portable tools.
有关其他工具的信息,请参阅PortableApps,其中包括将菜单放入系统托盘中,以便您快速访问所有便携式工具。
Once you've got that set up, then use an option like one of the following to share the directory across workstations:
完成设置后,使用以下选项之一的选项在工作站之间共享目录:
External Hard Drive
外置硬盘
A flash drive would be too slow, but often an external HDD is fine. Of course, you've got to lug it around. And it's no fun when you forget to bring it to work one day--as I did my laptop yesterday. :-) Drive letter changes can be another problem.
闪存驱动器太慢,但通常外置硬盘驱动器很好。当然,你必须把它拉出来。当你有一天忘记把它带上班的时候也没那么有趣 - 就像昨天我的笔记本电脑一样。 :-)驱动器号更改可能是另一个问题。
Mirroring Tools
A mirroring/backup tool is simple but error-prone. These are one-way tools, in that they copy everything from one workstation to another. The risk is that you make changes at one workstation, forget to run the tool, then change the same file(s) at your other workstation, and run the tool, overwriting your changes.
镜像/备份工具很简单但容易出错。这些是单向工具,因为它们将所有工作从一个工作站复制到另一个工作站。风险在于您在一个工作站上进行更改,忘记运行该工具,然后在其他工作站上更改相同的文件,然后运行该工具,覆盖您的更改。
- rsync
- DeltaCopy
Synchronization Tools
A step up from a mirroring tool would be a syncronization tool. These detect changes and allow you to make choices about merging. You have to remember to run it manually, or use another tool to schedule it to run at certain times.
从镜像工具升级将是同步工具。这些检测更改并允许您选择合并。您必须记住手动运行它,或使用其他工具安排它在特定时间运行。
Synchronization Services
These are services that automatically sync files between workstations. Most, if not all of them handle conflicts, and allow access to previous versions of files. They are nice because they are set-and-forget. You don't have to remember to run a mirror or sync tool. Also, these eliminate the need to leave one workstation powered up so that you can manually sync to it when you get to the other workstation.
这些是在工作站之间自动同步文件的服务。大多数(如果不是全部)处理冲突,并允许访问以前版本的文件。他们很好,因为他们一劳永逸。您不必记住运行镜像或同步工具。此外,这些消除了将一个工作站启动的需要,以便您在到达另一个工作站时可以手动同步到它。
- Dropbox (One quirk here for users of Instant Rails is that the space in the "My Dropbox" folder name is a show stopper.)
- SpiderOak
- Syncplicity
- Windows Live Sync
Dropbox(Instant Rails用户的一个怪癖是“我的Dropbox”文件夹名称中的空格是一个显示停止。)
Windows Live Sync
#2
I have just tried out the recently announced workspace mechanics plugin. It seems to be made exactly for the second part of the question.
我刚刚尝试了最近发布的工作区机制插件。它似乎完全是针对问题的第二部分。
You will need to provide a directory where the preferences are to be stored (by default ~/.eclipse/mechanic
). With the plugin installed, preferences can be easily exported to separate files. If you start a new workspace and point the plugin to the right directory (or leave the default), a dialog is displayed that lets you choose what settings to apply to the current workspace.
您需要提供一个存储首选项的目录(默认情况下为〜/ .eclipse / mechanic)。安装插件后,可以轻松将首选项导出到单独的文件中。如果启动新工作区并将插件指向正确的目录(或保留默认目录),则会显示一个对话框,您可以选择要应用于当前工作区的设置。
#3
In regards to problem #1, I use Dropbox and have been very happy with it.
关于问题#1,我使用Dropbox并对它非常满意。
I did notice one problem opening a project after being updated on another machine: Eclipse picks up changes in existing files but does not automatically add new files. This is resolved by simply right clicking the project and selecting 'Refresh'.
我确实注意到在另一台机器上更新后打开一个项目有一个问题:Eclipse获取现有文件中的更改但不会自动添加新文件。只需右键单击项目并选择“刷新”即可解决此问题。
#4
To followup on this, i've been using Pulse with some success poweredbypulse.com. Its not the ideal solution but it's been working pretty well for me so far.
为了跟进这一点,我一直在使用Pulse,并取得了一些成功的powerbypulse.com。它不是理想的解决方案,但到目前为止它一直很好用。
#5
Regarging #1, I've thought about this too. Microsoft's TFS has a "shelve" feature which does what you want (store pending changes on the server without committing). It's kind of like a personal branch.
重新定位#1,我也考虑过这个问题。微软的TFS有一个“搁置”功能,可以满足您的需要(在未提交的情况下在服务器上存储待处理的更改)。这有点像个人分支。
In subversion I would probably create a branch for my bleeding-edge, maybe-broken code, and just merge to trunk periodically.
在subversion中,我可能会为我的前沿,可能破坏的代码创建一个分支,并且只是定期合并到trunk。
#6
I utilize rsync to do a similar thing between my laptop(OSX) and desktop(linux).
我利用rsync在笔记本电脑(OSX)和桌面(linux)之间做类似的事情。
A quick google search mentions rsync is available for windows - so this may be an option for you.
快速谷歌搜索提到rsync可用于Windows - 所以这可能是一个选项。
You can probably set this up to be set on a schedule by your OS. I personally have it set up for when I access my office network or when files are changed.
您可以将其设置为由您的操作系统按计划设置。我亲自为我访问办公室网络或更改文件时设置了它。
#7
Eclipse and most other java tools are easily portable.
Eclipse和大多数其他Java工具都很容易移植。
You can copy the them to a thumb drive and run them on any machine. For the JDK it needs to have a similar OS.
您可以将它们复制到拇指驱动器并在任何计算机上运行它们。对于JDK,它需要具有类似的操作系统。
I have a "C:\Development" folder with eclipse, java, jboss, workspace, ant, maven, svn, etc.. which I can unzip and drop in C: on any windows machine and run my environment.
我有一个带有eclipse,java,jboss,workspace,ant,maven,svn等的“C:\ Development”文件夹。我可以在任何Windows机器上解压缩并放入C:并运行我的环境。
I don't run it off the thumb drive because you never know which letter the drive will get and some of the references eclipse keeps are fully qualified.
我不会从拇指驱动器上运行它,因为你永远不知道驱动器会得到哪个字母,并且eclipse保留的一些引用是完全合格的。
#8
You might consider using Pulse. Its free and its great for generating a standard Eclipse installation that includs all your plugins and workspace settings (if you use the freelance version - not free). Its nice to be able to generate one working Eclipse configuration and then repeat that same profile installation on another computer OR share that profile with an entire team.
您可以考虑使用Pulse。它是免费的,它非常适合生成标准的Eclipse安装,包括所有插件和工作区设置(如果你使用*版本 - 不是免费的)。很高兴能够生成一个正在运行的Eclipse配置,然后在另一台计算机上重复相同的配置文件安装,或者与整个团队共享该配置文件。
#9
Or simply Remote Desktop into your preferred computer from the other.
或者只是远程桌面从另一台计算机进入您的首选计算机