tags:

views:

457

answers:

2

I just started my first Mercurial project.

I did a 'cd' into my source directory.

Then I did this:

hg init myproject

But next I did

hg commit -m "first commit"

And all it reports is:

nothing changed

But when I do

hg status

It lists all of the source code in my project.

What am I doing wrong here?

+8  A: 

I think the output of the hg status command is probably telling you that you have a lot of files in your working directory that are not being tracked by Mercurial. You should be able to fix this by running the command

hg addremove

Then you can make your first commit:

hg commit -m "first commit"

Alternatively, you can do this all in one command with

hg commit -A -m "first commit"
las3rjock
'hg addremove' is easier to use as the project grows.
too much php
'hg addremove' is probably a better choice in this case, too, so I have edited my answer to reflect that.
las3rjock
also 'commit -A' does an automatic add/remove.
Ry4an
+1  A: 

Remember that because Mercurial is a DVCS, hg commit only effects your local copy of the repository. If you want to send your changes somewhere else, you'll need to use hg push.

Stephen Newell