开发者

How do you init a new Mercurial project with a different username?

Normally I would do this to start a new Mercurial project:

cd /project-directory
hg init

This 开发者_运维百科uses the username that is set somewhere on my machine (%USERPROFILE%\Mercurial.ini)

But on this occasion I want to initialize a project with a different username.

Is there an option to use with hg init to do this?


hg init doesn't use the username at all (repo starts with no changesets, at revision null). If you want to commit with a different username, use hg commit --user.

You can also set the username in the repository's hgrc (.hg/hgrc), just like you do in global one — then all commits to that repository will use it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜