2016-05-18 176 views
-1

我有一個網站項目,其中有幾個文件夾和子文件夾在我的桌面上。我想將這個網站複製到GitHub。使用GitHub桌面應用時,最好的方法是什麼?似乎我只能上傳單個文件,但沒有文件夾。將網站上傳到GitHub

+0

https://try.github.io/levels/1/challenges/1 – Marty

回答

0

在下面打開你的ssh和類型:

git remote add origin [Your HTTPS repository] 

如果收到請求SSH密鑰錯誤:

cd [full project folder name] (eg ~/desktop/project1) 
git init 
git add . 
git commit -m "initial commit" 
git remote add origin [email protected]:[YourUSERNAME]/[YourREPOSITORY].git 
git push -u origin master 

步驟5可以替換爲。

http://i.imgur.com/X0FDTbq.png

0

2種方式(雖然你應該設置它們如果可能的話):

使用命令行:

1. Create repo in github 
2. Click clone or download then copy the URL 
3. In command line,Navigate to the root of your project folder 
4. initialize: git init 
5. track files: git add . 
6. commit: git commit -m "your message/comment" 
7. add remote repository: git remote add origin 'paste the repo link' 
8. git push origin master 

使用App。

1. Create Repo on Github site 
2. On you app, click + sign, under clone tab and Find that repo, then clone 
3. Put all your files/folders inside 
4. Then Sync