Created
March 12, 2020 13:38
-
-
Save agentgt/97db11fadafed1579564b630138fc769 to your computer and use it in GitHub Desktop.
Using evolve for branching
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
hg init | |
echo Upstream1 > main.txt | |
hg add main.txt | |
hg commit -m "Master1" | |
hg branch -q feature | |
echo feature1 > feature.txt | |
hg add feature.txt | |
hg commit -m "Feature1" | |
echo feature2 >> feature.txt | |
hg commit -m "Feature2" | |
hg up default | |
echo Upstream2 > main.txt | |
hg commit -m "Master2" | |
now at this point you have two branches, you commit your feature branch to your testing repo for inspection, once you are satisfied you run | |
hg rebase -d . -b feature --collapse | |
Now | |
hg log -G --hidden | |
shows you your hidden branch. The point is if you now push the hidden branch will not be pushed. Another effect is, that you can reuse the name of the named branch again later. This all only works with the evolve extension enabled. I find it very useful (although most of the times I prefer merge over rebase). | |
regards | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment