drhg24275 2013-02-27 09:52
浏览 40
已采纳

与Netbeans合作的最佳方式

Until now, I always used the FTP transfer provided with Netbeans. Everytime I write and save, it uploads the file to the server.

Now I have a project that me and my co-worker have to work on. The method above isn't the best anymore, because if I do some changes and save, and so my co-worker, we overwrite each other modifications.

What's the best way to cooperate on the same PHP/CSS/HTML project? Could you provide some guide too?

Thanks.

PS: OS Win7.

  • 写回答

1条回答 默认 最新

  • doudao1922 2013-02-27 10:17
    关注

    I personally use Mercurial (Hg) when working on projects with a team.

    There is a Tutorial for using Mercurial with NetBeans.

    When your team is small you could use bitbucket.org to host your project as it is free and private (but in the free version limited to 5 people per project I think). Otherwise you could easily set up your own hg-server. There are plenty of guides on how to use Mercurial on their website

    In case you are not familiar with distributed version controll systems. In a nutshell it works like this:

    1. When a file is created it gets pushed to the server
    2. As people make changes to their local copy of that file (or the files) they create changesets which contain only the changes they made.
    3. Everyone pushes theis changesets to the server from time to time and pulls the changes the others have made. The changesets are then merged to contain everybodys changes.
    4. The files on your computer are updated according to the changesets you have pulled so that everybodys files are up to date.

    This works pretty well as long you don't edit the same lines of code (because then the automatic merging fails because it doesn't know what to keep and what to discard and you have to merge manually) and your files are not in a binary dataformat. But in your case HTML, PHP and CSS are all text based so you are good to go.

    I hope this helped. If you have any questions feel free to ask. Sorry I could not post more links because my reputation is too low.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog