Chris@496: Chris@496:

Back to Topics


Chris@496: Chris@496: Chris@496:

I've added a new file: what do I do with it?

Chris@496: Chris@496:

When you add a new file in the working folder, you normally want to Chris@496: ensure that Mercurial keeps track of changes to that file – and that Chris@496: the file is included in all copies of the repository. To do this, you Chris@496: need to tell Mercurial to track the file by adding it to version Chris@496: control.

Chris@496: Chris@496:

EasyMercurial shows files that have been created but not added in the Chris@497: “Untracked” file list under “My work”. (If your file is not listed Chris@496: there, try clicking the Refresh button.)

Chris@496: Chris@496:

1. Find the file you want to add in the Untracked list and select it

Chris@496: Chris@496:

2. Click Add in the toolbar on the left of the window

Chris@496: Chris@496:

The file will be moved to the “Added” list. This tells Mercurial to Chris@496: track the file. The next time you commit, the contents of your new Chris@496: file will be recorded as part of that change set. Chris@496:

Chris@496: Chris@496:

Of course, you don't always want to track every file in your working Chris@496: copy. Object files generated by a compiler, output files from tests, Chris@496: etc should often not be included in version control. You can ensure Chris@496: that such files don't show up in the Untracked list by right-clicking Chris@496: on them and choosing “Ignore...".

Chris@496: Chris@496:

Back to Topics