2011-02-10 79 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