Mercurial between server and local?

血红的双手。 提交于 2019-12-12 09:59:28

问题


I have a portal development work in process... I had some troubles time to time like losing, overwriting wrong files, etc... So I decided to go for Mercurial for this development. My first experience with Source Control.

I work on server [bluehost] for this project, is there any way to keep update backups at local? Do I have to setup Mercurial to Bluehost? any way to sync changes on server to my local mac?


回答1:


Here is a proposed configuration:

  • a Mercurial repository on your server. That repository will be used for the deployment (using export for example) of the new revisions of your website.
  • as many clones of that repository on your laptop, desktop, etc... any place you'll work on.

You work on (one of) your local clone, perform commits, etc... When you're happy with your work, you push the changes to the repository on your server. There, you can integrate your changes, and eventually promote a new revision of your website (e.g. on a tagged revision).

In order to keep in sync, you just have to pull the latest update from your server's repository, or any local one, if you prefer to do some prototyping.

Anyway, I would strongly recommend that you read both the workflows guide as well as the HG Book. They are easy to understand even for someone unexperienced in VCS.



来源:https://stackoverflow.com/questions/2272653/mercurial-between-server-and-local

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!