I started doing some changes in a mercurial repository, without commiting them.
After 15 changed files, I’ve realized the changes could be a branch.
In this scenario, which would be the best way to create a branch? If I just create a new branch and move to it, could I just commit my files?
If you’ve modified but not committed changes you need only do:
all the
hg branchcommand does is say what branch the next commit should be on. You’ve not yet committed, so justhg branchand you’re good.As an example if you did this:
you’d have a branch called
correctly_spelledand no record whatsoever ofmisspelled.