2012-08-01 82 views
4

我知道這看起來像一個愚蠢的問題,但如何下載此網址?使用git? svn checkout http://android-playground.googlecode.com/svn/ android-playground-read-onlyGit克隆連接超時

我想下載一些swipey選項卡的代碼,並將其作爲我的參考,所以我按照網上的一些說明,但我不能下載它..它說連接超時。 這裏是我的終端

Cloning into 'SwipeyTabsSample'... 
fatal: unable to connect to android-playground.googlecode.com: 
android-playground.googlecode.com[0: 173.194.72.82]: errno=Connection timed out 
android-playground.googlecode.com[1: 2404:6800:4008:c01::52]: errno=Network is unreachable 
+7

不,這是使用svn而不是git。你需要安裝顛覆。 – Thilo 2012-08-01 08:51:51

+0

aah ..好吧,我認爲svn和git是一樣的。謝謝 – thenewbie 2012-08-01 08:53:52

+0

@Thilo:雖然這是一個真正的SVN URL,除了'git svn'外,沒有其他需要。 – eckes 2012-08-04 11:52:20

回答

3

我不知道爲什麼沒有人提到git svn我的錯誤:你能它使用Git:有包含在標準的Git分佈git svn。這需要一個SVN回購和克隆成一個Git回購:

git svn clone http://android-playground.googlecode.com/svn/android-playground-read-only 

一旦克隆完成後,你可以在使用Git回購工作。

由於它是隻讀的,因此您將永遠不會去git svn dcommit(將更改推回到回購)。檢查man page of git svn以便了解可用的其他參數和命令(例如,不克隆完整的歷史記錄,但僅克隆最後的修訂版等等)。

git svn has(AFAIK)它沒有正確地克隆SVN回購的標籤和分支的問題。爲了達到這個目的,請檢查svn2git


結語:
我想你剛開始使用版本控制,因此認爲Git和SVN將是相同的。如果我今天開始,我會選擇一個將來要使用的RCS。來自SVN,我沒有後悔切換到Git的一天。