Hg
Published: 12:55, Thursday 14 July 2011
Notes
What's this? See my article about Notes.
View as plain text file.
install: sudo apt-get install mercurial
clone a project:
hg clone ssh://project-url
will create the project dir
setup/create a project: hg init (project-directory)
change and commit/push:
hg commit -m 'Comment'
hg push
status: hg st
statistics: hg churn
differences: hg diff
add/rm/removing files:
hg add (new files)
hg addremove
hg remove
hg remove -A
log: hg log
revision: hg cat -r n file
update
navigate between revisions
without args: go to last version
settings
.hgrc
editor = vim
username = Name <mail>
localhost:
hg serve (--daemon)
hosting
bitbucket
hg clone ssh://hg@bitbucket.org/fuligginoso/projectname
hg push ssh://hg@bitbucket.org/fuligginoso/projectname
ignore files:
.hgignore
syntax: glob
folder/**
syntax: regexp
revert:
hg revert filename
will create filename.orig
branching:
tip: most recent changeset
hg -q
hg pull sth
does not change, need to update, download
hg update
check: pull and then push with no changes - repos are identical
revert --all
pre-commit hook:
.hg/hgrc
[hooks]
commit = script
Write a Comment
* These fields are mandatory.