分布式版本控制系统mercurial hg常用命令

www.allocmem.com · · 3600 次点击 · · 开始浏览    
这是一个创建于 的文章,其中的信息可能已经有所发展或是发生改变。

mercurial

mercurial是一种轻量级分布式版本控制系统,采用 Python 语言实现,易于学习和使用,扩展性强。其是基于 GNU General Public License (GPL) 授权的开源项目。由于目前工作需要使用mercurial,这里记录下自己使用到的常用命令,作为参照,不定时更新。

常用命令

  1. 配置好类似git的ssh,使用hg clone ssh://code@xx.com/yy 克隆xx.com的yy项目
  2. hg status => git status
  3. hg branch => git branch
  4. hg commit -m ‘xxx’ => git add . & git commit -m ‘xxx’
  5. hg pull => git pull
  6. hg update => git fetch –all
  7. hg merge another_branch => git merge another_branch
  8. 解决冲突可以利用IDE的mercurial,merge的时候遇到冲突直接在vim模式下使用:cq直接退出,然后点击IDE中version control => local changes => 右键红色冲突的文件选择解决冲突即可进行处理
  9. hg update -C => git reset –head =>丢弃当前对文件做的所有修改
  10. hg push -b dev-r2 => 推送本地dev-r2分支到远程版本仓库
  11. hg diff => git diff

附录

  1. http://www.worldhello.net/gotgit/90-app/040-hg-git-face2face.html
  2. http://www.worldhello.net/gotgit/90-app/040-hg-git-face2face.html

本文来自:www.allocmem.com

感谢作者:www.allocmem.com

查看原文:分布式版本控制系统mercurial hg常用命令

3600 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传