'Give name to an anonymous branch
I had an anonymous branch (branch without naming, in red rectangle) result from cloning.

I realize I may provide name to the anonymous branch through bookmarking
However, bookmarking is not permanent. I was wondering, whether I can make the anonymous branch to truly named branch? Is it too late to do so? Or I should do it in the very beginning of 1)Change calendar to dateTime. change?
Thanks.
Solution 1:[1]
You can't change the branch name on that changeset, but you can name the branch by just adding a new commit with the branch name you want. Henceforth 'hg clone -r branchname' and 'hg diff -r branchname' and the like will refer to that branch's latest tip.
You've been elsewhere advised by both Lasse and myself that named branches aren't a great idea for features, being better suited for long-lived things like branches of development (ex: stable, expirimental etc.) but so long as you understand the permanence of named branches relative to bookmarks and anonymous branches you can make whichever decision you like for your feature branching solution (personally, I prefer anonymous branches in named clones).
Solution 2:[2]
You can use Rebase extension.
- Update working copy to "update tag" revision
- Create new branch e.g "new branch" (hg branch new branch)
- Commit it (hg commit --message=Separate branch for my changes)
- Rebase the changesets starting from "Change calendar to dateTime" on top of new commit.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Ry4an Brase |
| Solution 2 | Glorfindel |
