2011-02-10 75 views
1

我对TFS和Vault很熟悉,但刚开始使用Mercurial时,我似乎陷入了一团糟。Mercurial新手困惑

继承人什么,我(觉得)我做:

-Created一个中央资料库从到位桶bitbucket.org

-On我的台式机,克隆库,添加的文件,提交它们,推他们从到位桶到位桶

-On我的笔记本电脑,克隆库,拉文件,添加多个文件,提交他们,推动他们到位桶在不同的计算机

我继续添加,编辑等。

现在我已经注意到,每台计算机的某些文件不在bitbucket存储库中,因此只在本地存储库中。没有任何推拉似乎将它放入bitbucket存储库。

我做错的最可能的事情是什么? 有没有办法通过修改bitbucket存储库来“强制”?

+0

显示`汞out`和`汞st`导致 – zerkms 2011-02-10 12:20:23

+0

是到位桶仓库公众?如果是这样,你可以压缩你的本地克隆并在某个地方使用它? – 2011-02-10 12:30:11

回答

2

他们是否进入您的本地存储库?我怀疑不是,即它们是没有添加到提交中的新文件。在提交之前使用hg add将它们添加到变更集中,或者使用任何与您使用的任何mercurial接口等效的内容。

编辑:

下面是从水银的帮助:

C:\Users\Bert>hg add --help 
hg add [OPTION]... [FILE]... 

add the specified files on the next commit 

    Schedule files to be version controlled and added to the repository. 

    The files will be added to the repository at the next commit. To undo an 
    add before that, see "hg forget". 

    If no names are given, add all files to the repository. 
... 

的Mercurial:权威指南(又名汞 “红书”)的详细信息:

http://hgbook.red-bean.com/read/mercurial-in-daily-use.html

告诉水银哪些文件来追踪

水银不会与文件存储库中的,除非你告诉它来管理他们的工作。 hg status命令会告诉你Mercurial不知道哪些文件;它使用“?”来显示这些文件。

要告诉Mercurial跟踪文件,请使用hg add命令。一旦你添加了一个文件,该文件的hg状态输出中的条目从“?”变为“A”。

$ hg init add-example 
$ cd add-example 
$ echo a > myfile.txt 
$ hg status 
? myfile.txt 
$ hg add myfile.txt 
$ hg status 
A myfile.txt 
$ hg commit -m 'Added one file' 
$ hg status 

use "hg -v help add" to show global options