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 (強行提交)
相關文章
相關標籤/搜索