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

前端 未结 5 817
夕颜
夕颜 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:53

    In your ~/.hgrc (*nix) or mercurial.ini (Windows) file:

    [ui]
    username = First Last 
    

    (mercurial.ini is in C:\Documents and Settings\[username]\ for XP and lower, C:\Users\[username]\ for Vista and higher. You can also run hgtk userconfig if you have TortoiseHg installed and do it that way.)

提交回复
热议问题