如何在本地/远程工作并使工作始终同步
这是一个新手问题。
我有一个服务器,我已经在其中上传了所有工作目录。这是 Django 中的一个小项目。
我想在语言环境和远程服务器中工作,但我希望这两个目录保持同步。当我要在计算机上工作时,我会同步工作目录。反之亦然。
有人建议我使用 sshfs、rsync、git。
您有什么建议?我应该使用哪一个?
this is a newbie question.
I've a server where I've uploaded all my work directory. It's a small project in Django.
I want to work either in locale and in remote server, but I want the both directories ever synchronized. When I'm going to work on my computer, I would the work directory to be synchronized. And vice versa.
Someone says me to use sshfs
, rsync
, git
.
What are your recommendations? Which one should I use?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
无论如何,您应该使用 git(或其他版本控制系统),以确保您始终拥有对工作所做的更改的记录。如果您正确设置 git 远程,并且始终确保在启动时从远程拉取并在完成时推回,那么跨系统同步是您将获得的额外好处。
You should be using git (or another version control system) anyway, to ensure that you always have a record of the changes you make to your work. Synchronising across systems is an added benefit that you will get if you set up the git remotes properly, and always ensure that you pull from the remote when you start and push back when you finish.
它们之间完全同步的最简单答案... Drop Box :)
但 git 可能会很好地为您服务。特别是如果您希望有一天对此进行扩展,拥有一个 QA 与生产服务器,您可以在其中进行更改。这个话题是一个很大的话题,这里已经回答过几次了。搜索“git生产部署”以获取围绕该主题的问题列表。
Easiest answer for complete synchronization between them... Drop Box :)
But git might serve you well. Especially if you want to expand on this someday to have a QA vs. Production server that you stage changes across. That topic is a big one that's been answered a few times here. Do a search for "git production deploy" to get a list of questions around that topic.