bitbucket, “hg push” and “hg update”

后端 未结 4 1600
旧时难觅i
旧时难觅i 2021-02-01 22:14

If I start out with a local mercurial repo, which I consider to be the \"main\" repo (pardon me my dvcs lords), and intend to use bitbucket as a backup and issue tracking facili

4条回答
  •  面向向阳花
    2021-02-01 23:00

    I think you might be getting confused between the working copy (aka working directory) and the local repository. These are related but separate things. The local repository contains the full history of all tracked files whereas the working copy contains versions of the files from a particular revision plus your changes to them,

    The hg command push and pull move changes between repositories and update and commit moves changes between your working copy and your local repository.

    So if you push changes to a remote repository that will not change the local repository and so there's no need to run an update on the local repository. However, anyone using the remote repository will need to do an update so your changes are shown in their working copy. Conversely, if you pull changes from a remote repository you will need to do an update so that these changes are shown in your working copy.

    Similarly, you need to commit all changes from your working copy into the local repository before they can be sent to another repository using push.

提交回复
热议问题