How do you set the username that Mercurial uses for commits?

前端 未结 5 818
夕颜
夕颜 2021-01-31 01:06

When I commit something in Mercurial like this:

hg commit -m \"username question\"

I see this output:

No username found, using          


        
5条回答
  •  走了就别回头了
    2021-01-31 01:30

    you can specify your username on the command line directly if you want to using --config. eg

    hg --config ui.username=frymaster -m "comment here" commit
    

    in fact, you can override anything in your .hgrc with this command. just look at your .hgrc and note the format:

    [section]
    key=val
    

    that translates directly to

    hg --config section.key=val
    

提交回复
热议问题