Monday, September 26, 2016

Mercurial Hg - frequently used commands

hg clone
copy a locally non-existent repository from remote repository
hg pull --rebase
pull changes from remote to local, rebase local commits on new head
hg pull -u
pull changes from remote to local, update working dir to new head
hg update [optionally: where]
updates working dir to head or specified revision
hg st
hg status
list status of the working directory
hg commit
commit changes
hg commit --amend
amend last commit
hg push
push to remote repository
hg rebase -s [what] -d [where]
rebase one commit and its children to another commit -- commits specified by [commit number]
hg strip --keep [what and its children]
remove a commit and its children, and keep the changes in the working directory
hg strip [what and its children]
delete a commit and its children (will not keep changes!)
hg purge
cleans the working directory
hg shelve
hg unshelve
shelve or unshelve changes in the working directory

No comments:

Post a Comment