2014-09-06 40 views
0

我在Gitorious中創建了一個帳戶,我想從我的計算機上傳代碼,但我不知道該怎麼做。在互聯網上搜索,我意識到我無法觀看菜單從儀表板上傳代碼。在Gitorious上傳代碼

我創建了公共SSH密鑰,並創建了一個項目和一個存儲庫。我怎樣才能從我的電腦上傳代碼?

謝謝。

+1

什麼是您的操作系統(考慮使用Linux)。你是否熟悉命令行中的[git](http://git-scm.com/)? – 2014-09-06 18:58:32

+0

我的操作系統是Windows 7,但我知道如何運作Linux,因爲我工作。 – axmug 2014-09-07 10:13:00

回答

0

答案:

  1. 上gitorious
  2. 您的本地磁盤上的程序目錄中添加新的項目和新的回購:

    git init 
    git add . 
    git commit -m " name " 
    git remote add origin [email protected]:my-project-name/my-git-repo.git 
    git push origin master 
    

如果你有錯誤:

fatal: remote origin already exists. 

則:

git remote rm origin 
    git remote add origin [email protected]:my-project-name/my-git-repo.git 
    git push origin master 

它是基於:

  1. faq - How do I point my local Git repository at Gitorious?

  2. Creating a new git repository in Gitorious by kosmas

  3. Getting started with Git and Gitorious by sagarun