Created
April 7, 2013 08:23
-
-
Save jamesmichiemo/5329559 to your computer and use it in GitHub Desktop.
Useful Commands for Mercurial
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Mercurial commands for Terminal | |
# NOTES: Lines starting with // or # are comments and should not be typed into terminal. | |
#For additional help use the wiki at http://mercurial.selenic.com/wiki/ | |
//Help for Commands | |
#<command> help: | |
$ hg help <command> | |
or | |
$ hg <command> - -help | |
//Standard Commands from add to push (in order) | |
#add files and folders that contain files to be commited: | |
$ hg add . | |
or | |
$ hg add <filename1, filename2, ...> | |
#show changes to be commited: | |
$ hg status | |
#commit all added items to the staging area with a detail message: | |
$ hg commit -m 'add descriptive commit message' | |
#push local repo to remote: | |
$ hg push | |
//Setting up a New Repo | |
# change terminal's directory to that of your local repository folder | |
$ cd /path/to/folder/of/your/files/ | |
#new repository command: | |
$ hg init <path> | |
#copy repo from an existing repo: | |
$ hg clone <sourcePath> [<destinationPath>] | |
//Misc | |
#create new branch: | |
$ hg branch <branchName> | |
$ hg commit -m "add <branchName> branch" | |
#change to specific branch: | |
$ hg update <branchName> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment