我有我試圖轉換爲Mercurial的Git存儲庫。運行無法將Git存儲庫轉換爲Mercurial
hg convert c:\code\git-repo
導致以下錯誤:
assuming destination git-repo-hg initializing destination git-repo-hg repository abort: cannot find required "git" tool
我已經安裝了Git Hub for Windows應用。我錯過了別的嗎?
我有我試圖轉換爲Mercurial的Git存儲庫。運行無法將Git存儲庫轉換爲Mercurial
hg convert c:\code\git-repo
導致以下錯誤:
assuming destination git-repo-hg initializing destination git-repo-hg repository abort: cannot find required "git" tool
我已經安裝了Git Hub for Windows應用。我錯過了別的嗎?
感謝dimo414和J-16 SDiZ的幫助,我能夠解決它。問題在於GitHub for Windows沒有將Git的位置設置到Windows路徑中。將它添加到路徑中或者只是在Git文件夾中運行hg convert應該可以工作。
從錯誤,聽起來像hg convert
預計能夠使用git
命令行工具。如果從命令提示符下運行git --version
,會發生什麼情況?如果沒有,你應該可以從Git downloads page安裝它。如果它已經安裝,您可能還沒有將git
添加到您的Windows PATH
。
另一種方法是使用hg-git
,它允許您克隆並推送到遠程Git存儲庫作爲 Mercurial存儲庫。
我得到'git'不被識別爲內部或外部命令, 可操作的程序或批處理文件。 –
嘗試將'git'名稱和路徑添加到git.exe值的環境變量。
將git的路徑添加到路徑。 Mercurial是一場噩夢。 –
就是這樣。我修改了路徑並且它工作了 –