Skip to content

Instantly share code, notes, and snippets.

@tmcgilchrist
Created October 8, 2011 01:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmcgilchrist/1271716 to your computer and use it in GitHub Desktop.
Save tmcgilchrist/1271716 to your computer and use it in GitHub Desktop.
Personal Mercurial Workflow

Mercurial Workflow

Clone -> Edit -> Commit -> Push -> Update

hg clone http://bitbucket.org/repo        => Clone a remote repo

hg clone project_dir new_changes_dir      => Clone a local repo

hg commit -m "Message"                    => Commit locally changed files.

hg push project_dir                       => Push changes to another repo

hg update                                 => After a pull update local working copy to latest.

Mercurial Advanced

hg tip -vp              => Show last change committed.

hg incoming repo_dir    =>  tell us what changes hg pull would bring in

hg outgoing repo_dir    => tell us what changes hg push would send out

With mecurial you'll end up with a number of directories that represent different pieces of work (similar to branches in git).

eg

project              => Contains a local clone of the master remote repo or is the local master repo

project_bug_11       => Changes required to fix bug_11

project_feature_foo  => Changes required to implement feature foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment