2011-10-01 132 views

回答

21

如果你的VPS已經安裝了水銀,只需:

hg push ssh://[email protected]/path/relative/to/home 

或添加到回購的hgrc

[paths] 
default-push = ssh://[email protected]/path/relative/to/home 

,只是

hg push 
+2

FYI其他任何人到這裏來的,前嘗試以上:在進行hg push時,需要在主機名之後使用雙斜槓作爲絕對路徑。請參閱[這個答案。](http://stackoverflow.com/questions/4431884/cloning-a-mercurial-repository-over-ssh#answer-8096666) – deadbeef404

+1

不,不需要,它只是意味着別的東西。雙斜槓使路徑在主機上是絕對路徑,單斜線與家庭相關(正如Lazy Badger的答案中正確提到的那樣)。 – RedGlyph

+0

@RedGlyph,你是對的。我已經更新了我的帖子,以更清楚地表明我的意思。 – deadbeef404

相關問題