Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/mercurial/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/solr/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mercurial &引用;hg提交";-什么也没发生!_Mercurial - Fatal编程技术网

Mercurial &引用;hg提交";-什么也没发生!

Mercurial &引用;hg提交";-什么也没发生!,mercurial,Mercurial,我刚开始我的第一个Mercurial项目 我在我的源目录中做了一个“cd” 然后我做了这个: hg init myproject 但接下来我做到了 hg commit -m "first commit" 它的所有报告都是: nothing changed 但当我这么做的时候 hg status 它列出了我项目中的所有源代码 我做错了什么?我认为hg status命令的输出可能告诉您,您的工作目录中有很多文件没有被Mercurial跟踪。您应该能够通过运行命令来修复此问题 hg addre

我刚开始我的第一个Mercurial项目

我在我的源目录中做了一个“cd”

然后我做了这个:

hg init myproject
但接下来我做到了

hg commit -m "first commit"
它的所有报告都是:

nothing changed
但当我这么做的时候

hg status
它列出了我项目中的所有源代码


我做错了什么?

我认为
hg status
命令的输出可能告诉您,您的工作目录中有很多文件没有被Mercurial跟踪。您应该能够通过运行命令来修复此问题

hg addremove
然后您可以进行第一次提交:

hg commit -m "first commit"
或者,您也可以使用

hg commit -A -m "first commit"

尝试
hg push
,然后在存储库发生更改时刷新存储库,尽管说没有更改

“hg addremove”随着项目的增长更容易使用。“hg addremove”在这种情况下可能也是一个更好的选择,因此,我编辑了我的答案以反映这一点。另外,“提交-A”会自动添加/删除。添加/删除
addremove
会做什么?它是否与
add
,然后
remove-A
相同?只是出于好奇,您是否试图遵循“Mercurial:最终指南”的这一部分:?