Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add .hgignore to my Mercurial folder?

I'm learning to use Mercurial, and its learning curve is pretty straightforward. But one of my problem is, I can't add the .hgignore file to Mercurial folder. Windows (7) does not allow me to do this, and when I run the command

hg add .hgignore

, it returns error:

the system cannot find the specified file.

How can I create/add this file?

like image 342
Quan Mai Avatar asked Feb 11 '11 02:02

Quan Mai


People also ask

How do I create a Mercurial repository?

Create a local Mercurial repository Open the project you want to store in a repository. From the main menu, choose Hg | Create Mercurial Repository. Specify the location of the new repository.

What is .hg folder?

hg folder keeps track of one repo only. If you've got one in your home directory it means your home directory is under version control.

What is hg status?

hg status shows the status of a repository. Files are stored in a project's working directory (which users see), and the local repository (where committed snapshots are permanently recorded). hg add tells Mercurial to track files. hg commit creates a snapshot of the changes to 1 or more files in the local repository.


1 Answers

Execute

touch .hgignore

or

echo "" > .hgignore

in the needed directory

like image 53
zerkms Avatar answered Oct 13 '22 21:10

zerkms