hg命令

hg经常使用命令git

hg命令跟git命令大同小异url

hg version 查看hg版本spa

hg clone url 克隆代码仓库debug

hg branch newBranch 建立分支rem

hg update otherBranch 切换到其余分支it

hg update -r versionNum 切换到指定版本号io

hg pull 拉取代码date

hg commit 提交代码bug

hg push 推送代码推送

hg log -v 查看提交记录

hg log --debug 查看提交记录(更详细)

hg status 查看变动

hg diff 查看异同

hg revert 版本号 --all  还原更改

hg merge 合并代码

****************************************************************************************************************

hg提交代码常见问题解决
1. 合并代码过程出现`停止: outstanding uncommitted merge`提示
$ hg update --clean
$ hg merge yourBranchName
$ hg commit -m '改动内容描述'
$ hg push

2. 执行hg命令时,出现`waiting for lock on working directory of ...`
在文件目录下,找到.hg/wlock或者.hg/store/lock文件,删除后便可正常操做
 
3. 执行hg命令时,出现`push creates new remote head xxxxxx, merge or see 'hg help merge' for details about pushing new heads`
 
改问题多是被人合并或改动了你的分支产生,因此查看是否有更改,如有hg pull, 若无,则hg push -f (强行提交)
相关文章
相关标签/搜索