How do I choose a branch other than "default" for "master" when converting a repo from Mercurial to Git? -
i need convert long-standing mercurial repo git repo (one-way, one-time conversion), , i'd pick mercurial branch other default
master
branch in git repo.
i've converted mercurial git on smaller repo before, , after few gotchas easy google , fix, went well. in case, made sense map default
branch master
. (the other branch mapping "dev" "dev".)
in new case, repository have inherited uses default
branch development, , merges approved changes stable
branch. so, when comes on git, i'd git master
branch reflect stable
mercurial branch, , branch reflect default
mercurial branch.
is possible?
of course it's possible.
just convert mercurial repo git, using whatever tools convenient you. if end final branches not liking, can rename them. use git rename
.
for example, rename branches "master" "dev" (that is, swap branches each other):
git rename -m master master-old git rename -m dev master git rename -m master-old dev
see git-rename
man page more information.
Comments
Post a Comment