TortoiseHg 命令
来源:互联网 发布:方便面 数据报告 编辑:程序博客网 时间:2024/05/16 06:34
1. Kiln Command
hg clone
hg clone http://www.example1.com/hello
Make an identical copy of an existing repository.
hg pull
Pull changes from a remote repository to local, but this does not update the copy of the project in current working directory.
hg push
Push changes from local repository to server.
hg push –new-branch
Push new branch to server.
hg update
Update to the tip revision.You should invoke "hg update" once you invoke "hg pull" to reach the newest code. And your code may be merged in this step.
hg update [number]
Update working directory to the changetset specified by the number.
hg update default/new_branch
Switch to default branch or new_branch branch.
hg commit
Create a new changeset.If your code was changed after you invoke "hg commit", you must invoke "hg commit" again to push your new code to server, otherwise your code will be in your local and won't be pushed to server.
hg commit –close-branch
Close a branch, hide it from the branch list.
hg merge
Start a merge between the two heads.
hg megre -r 8888
Merge with a specified changeset.
hg add
Tell Mercurial to start tracking file which is not in current repository but existed in other place, then we add it to current repository.
hg remove
Make file no longer belongs in current repository.
hg revert
hg revert [filename]
Revert the specified file.
hg revert -r [changeset] -a
Revert all files of the specified changeset.
hg revert -a
Revert all changed files.
hg branch
To find out what the current branch is.
hg branches
List the named branches already present in current repository.
hg fetch
hg fetch === hg pull + hg merge
hg log
Get the history of changes in the repository. -r / --rev - To narrow the output of hg log down to a single revision. You can provide as many revisions as you want. - eg: hg log -r 1 -r 3 - You can also use range notation. - eg: hg log -r 2:4 hg log -r 4:2 - See the detail of a changed. - eg: hg log -v(--verbose) -r 3 - See both the description and content. This displays the content of a change as a unified diff. - eg: hg log -v -p(--patch) -r 2
hg status
Print files which have been changed. The status of a file may be:- M (Modified)- A (Add)- R (Removed)- ? (Not tracked)
hg diff
Compare changes we've made to the file.
hg outgoing
Tell us what changes would be pushed into the server repository. The changes would be pushed if a push was requested."hg outgoing" should be executed after "hg commit", otherwise you won't find the change of code.
hg incoming
Tell us what changes the hg pull command would pull into local repository, without actually pulling the changes in."hg incoming" should to be executed before "hg pull".
hg heads
View the heads in a repository.
hg rollback
Roll back the last transaction. And there is no way to undo a rollback.
hg graft
Copy changes from other branches onto te current branch.
hg help
Show help for a given topic.
hg graft -r 8888
2. Aliases
commit - ciupdate - upremove - rmincoming - inoutgoing - outstatus - st
3. Team workflow
(1) hg fetch(2) ... // Happy coding.(3) hg fetch // Get the new changeset from others to make your code be newest before pushing your code to server.(4) ... // Check your code.(4) hg commit -m "push code" // Commit your code.(5) hg push // Push to the server.
4. Others
- Short options can be written together.
eg: hg log -v -p -r 2 hg log -vpr2
- Most commands will print more output when passed a -v (or –verbose) option, and less when passed -q (or –quiet).
- You can’t push anything if you don’t add a commit.
阅读全文
0 0
- TortoiseHg 命令
- TortoiseHg
- hg clone 命令的windows解决方法TortoiseHg
- TortoiseHg入门教程
- TortoiseHg 入门教程
- tortoisehg使用
- Configuring TortoiseHg
- Mercurial与TortoiseHg简介
- TortoiseHg的使用
- TortoiseHg 客户端搭建
- TortoiseHg 学习笔记
- TortoiseHg学习笔记
- TortoiseHg 学习笔记
- TortoiseHg 学习笔记
- 使用TortoiseHg获取AndEngine源代码
- Mercurial与TortoiseHg使用入门教程
- TortoiseHg一款团队开发工具
- Mercurial 1.5 和 TortoiseHg 1.0
- 多线程(一)
- 自己用的unity学习笔记(四)——unity3d UGUI
- SpringBoot
- Python海量数据处理之_Hadoop(一)集群搭建
- exe生成一键式安装版exe(中文安装,安装后exe图标自定义)
- TortoiseHg 命令
- 微信支付的支付目录配置的坑
- 喝果汁、玩AR,AR圈里总有一种让人又爱又恨的走心体验
- 手把手教你怎么撩妹,五分钟读懂!提取于《谈话的力量》
- 2017.12.21
- JSP学习心得之一:JSP开发环境下载与配置
- es6浅学-let和const
- 数据结构课程设计——学生成绩管理系统
- Android 异步回调中操作UI线程,UI同步、卡死阻塞等性能问题