Created
March 18, 2014 14:08
-
-
Save drmalex07/9620784 to your computer and use it in GitHub Desktop.
Provide an example workflow with Mercurial branches. #mercurial #hg #scm
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
# | |
# Example configuration for .hgrc | |
# | |
[extensions] | |
extdiff= | |
graphlog= |
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
# Create a new branch and immediately switch to it | |
hg branch feature-a | |
# work inside "feature-a" and commit your work | |
hg commit | |
# Switch to our default branch (updating also our working copy) | |
hg update default | |
# work inside "default" and commit | |
hg commit | |
# Switch back to "feature-a" | |
hg update "feature-a" | |
# work a little more | |
hg commit | |
# Switch to default branch | |
hg update default | |
# Preview diffs | |
hg diff -r default:feature-a # textual | |
hg extdiff -p meld -r default:feature-a # visual | |
# Merge with feature-a | |
hg merge -t meld "feature-a" | |
hg commit | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment