2016-12-02 174 views
2

我想推一個Subgit創建git本地存儲到遠程GitHub沒有太多的運氣。將Subgit git回購推送到遠程GitHub回購/服務器

我創建使用回購subgit

$ subgit import --authors-file ./authors.txt --username svnuser --password svnpass https://foobar.com:8443/svn/StatDNA/git_migration/SparkDataSystem SparkDataSystem.git 
IMPORT SUCCESSFUL 

然後我在https://github.com/foobar/SparkDataSystem

$ cd SparkDataSystem.git 
$ git remote add origin https://ghuser:[email protected]/foobar/SparkDataSystem 
$ git push origin --all --follow-tags 
No refs in common and none specified; doing nothing. 
Perhaps you should specify a branch such as 'master'. 
Everything up-to-date 
$ git push origin master 
error: src refspec master does not match any. 
error: failed to push some refs 
$ git push --set-upstream origin master 
error: src refspec master does not match any. 

我也試過「subgit配置創造推GitHub的空回購;用相同的結果安裝'子網路徑'路由。我顯然錯過了將本地git回購推送到GitHub上的遠程回購的步驟。有任何想法嗎?

+0

是否https://foobar.com:8443/svn/StatDNA/git_migration/SparkDataSystem有主幹/分支機構/標籤結構?如果不是,則翻譯後版本庫可能爲空。在這種情況下,「subgit configure --layout directory ...」+「subgit install ...」可以幫助您替代「subgit import」。 –

+1

@DmitryPavlenko謝謝,就是這樣。這是一個帶有子項目的基本目錄,所以使用配置和佈局目錄,然後安裝效果很好。 – adamjk

回答

0

看一看,如果你需要改變https://ghuser:[email protected]/foobar/SparkDataSystemhttps://ghuser:[email protected]/foobar/SparkDataSystem.git

+0

沒有運氣,我嘗試使用.git擴展名,但沒有。 – adamjk

+0

好的。 '「錯誤:src refspec master與任何」'不匹配「,請確保'master'分支存在於遠程倉庫中。 'git branch -r'顯示遠程分支列表。 –

0

從當前的分支,試圖創建一個主分支,第一推。然後推其餘的。

git checkout -b master 
git push -u origin master 
git push origin --all --follow-tags 

此外,確保GitHub庫中創建(無README.md,沒有文件)