开发者

hg reset local repository to the state of remote one

how can I reset my local repository, to the state of remote one?

I have commited local changes (didn'开发者_开发问答t push).

I want to delete all the differencies.


There are several options:

  1. Make a new clone of the remote repo and throw away the old clone.
  2. Make a new clone of the local repo, but limit it to the last revision in the remote. (e.g. hg clone -r <last remote changeset> <local_repo_old> <local_repo_new>).
  3. Use the hg strip command from the mq extension to remove the changesets from your local repo

NOTE: When trying options 2 or 3, you can use the hg outgoing command to see which changesets have not yet been pushed to the remote repo.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜