<<

Mercurial (Hg) Cheat Sheet by CodeShane (codeshane) via cheatography.com/1611/cs/523/

Hg - Work Directory Hg - Local Repository Hg - Resources

A local Work folder containing one Revision A complete Local repository of that http://​ mer​ cur​ ial​ .se​ len​ ic.com and any uncommited changes you've made. is saved in Work/.hg/ (don't edit!) http://​ hgi​ nit​ .com

http://​ hgb​ ook​ .re​ d-b​ ean​ .com Hg - Undos and Fixes Hg - Local Repo History hg rollback can undo , import, pull, hg log file/dir History of changesets Hg - Remote Repository local push, and unbundle. Only use in private hg annotate file Who changed what, when A Remote repository reached via url path, often repos. hg paths Lists known remote Repos a main team repo from which Local is cloned. hg update --clean can cancel an uncommi​ tted List heads while losing changes. hg heads Hg - Remote Update and Publish hg -rREV -rREV hg push Push changesets to Remote Hg - Create an Archive Shows differe​ nces between REVs Remote hg archive -rREV filena​me.zip Hg - Create a Local Repo hg share Sync history with parent and hg archive -rREV filenam​ e.ta​ r.gz siblings hg init Work Creates ./.hg/ subfolder & Repo Hg - Work Files and Tracking Hg - Termino​ logy hg add Begin tracking all files hg add file Begin tracking changes Repository Repo. Collection of Revisions. hg commit -m Save files and Commit hg addremo​ ve Track new, forget Revision Rev. Commited , by 'Initial commit' message to Repo missing REV number. hg forget file Stop tracking file Changeset Set of Work changes saved as Hg - Clone Remote Repo Diffs. hg remove file Stop tracking & del hg clone Remote Work Diff Changes between files. hg copy file target Copy file Tag Name for a specific Rev. hg move file Move file Hg - Update from Remote Repo target Parent Immediate ancestor of Rev or hg incoming List changesets available Work. These changes to Work must also be Remote Branch Child of Rev. Committed to avoid data loss. hg pull Pull all new changesets into Merge Rev with two parents. Local Hg - Work Directory Updates Head Latest Rev in Branch. hg pull -r Pull specified changesets hg update tip Update Work to match Tip Remote into Local Tip Latest Rev in ANY Branch. All Diffs between two Revs. hg update - Update Work to specified -u Also Update Working rREV Revision Directory Bundle Patch with permiss​ ions and rename support. hg revert Undo all uncommi​ tted changes Hg - Union Merge Hg - Help hg pull --force unrel​ate​d_p​roject Hg - Work Status hg Basic command list. hg merge hg diff Lists tracked file changes hg help Full command list. hg commit hg diff file List changes to a file hg help command Detailed help reference. Powerful simplic​ ity! Use wisely. hg status Lists status of files

Added, Clean, Del​ eted, Ign​ ored, Mod​ ified, Unk​ nown

By CodeShane (codeshane) Published 15th August, 2012. Sponsored by Readability-Score.com cheatography.com/codeshane/ Last updated 18th June, 2014. Measure your website readability! codeshane.com Page 1 of 2. https://readability-score.com Mercurial (Hg) Cheat Sheet by CodeShane (codeshane) via cheatography.com/1611/cs/523/

Hg - Command Line hg command -opti​on... argume​nt... requi​ red non-li​ teral reference

Hg - Common Options

-rREV Specify a Rev number (default parent.)

-y Don't prompt; pick each first option.

-q Quiet (supress output.)

-v Verbose (additi​ onal detail)

-f Force (override reasonable warnings.)

By CodeShane (codeshane) Published 15th August, 2012. Sponsored by Readability-Score.com cheatography.com/codeshane/ Last updated 18th June, 2014. Measure your website readability! codeshane.com Page 2 of 2. https://readability-score.com