hg mercurial short list

Before beginning using mercurial, you should register your name.

echo "[ui]
username = user@server.no" >> ~/.hgrc

hg init create new repository(repo) in current dir
hg add add files to local repo
hg commit commit into local repo
hg log
hg summary shows version which is installed in current dir
hg log filename show file history
hg clone ssh://hg@server.no/repo-name/ clone central repo into local repo
hg push upload local repo to central repo
hg outgoing shows list of changes that are going to be uploaded to central repo by hg push command
hg incoming shows list of changes that will be downloaded from central repo by hg pull command
hg pull download changes from central repo, but it will not install that into your local repo dir
hg up installs latest version from local repo into a current dir
hg parent shows revision that is stored in your working dir
hg history shows changes history in local repo
hg status show uncommited changes in files
hg status --all show all files in repository
hg remove -filename- remove file from repo
hg diff -r 4 shows the delta between the working directory and changeset #4
hg log -r 4:. what patches would be applied to the working directory on an update do
hg diff --stat -r 4 same as above, but shows only filelist where changes were made
hg revert ./ cancel uncommited changes in current directory. This will delete all changes that you have made since last commit.


Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s