简体   繁体   中英

Why do I not have a .hgrc file?

I'm trying to insert the mercurial_keyring file with my username and password in the .hgrc file but it doesn't exist in my user directory on windows. I have tortoise hg installed and even checked if it was installed properly on the command prompt yet I still don't have the .hgrc folder.

Can anyone tell me what might be the reason to it?

Thanks

Because it's %USERPROFILE%\\mercurial.ini

Mercurial reads configuration data from several files, if they exist. These files do not exist by default and you will have to create the appropriate configuration files yourself:

Local configuration is put into the per-repository /.hg/hgrc file.

Global configuration like the username setting is typically put into:

 %USERPROFILE%\\mercurial.ini (on Windows) 

The .hgrc files are not created automatically when you install Mercurial or TortoiseHg.
You will need to manually create it at the location you need whether that is within the repository's .hg folder or your own C:\\Users\\username\\ folder.
You will probably need to use the command line to create the file as it's not usually possible to create filenames that start with . in Windows Explorer.

https://www.selenic.com/mercurial/hgrc.5.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM