2016-05-18 2 views
-1

У меня есть проект веб-сайта с несколькими папками и подпапками на моем рабочем столе. Я хотел бы скопировать этот сайт в GitHub. Каков наилучший способ сделать это при использовании настольного приложения GitHub? Похоже, я могу загружать только отдельные файлы, но не папки.Загрузить сайт в GitHub

+0

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

ответ

0

Откройте ваш 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 может быть заменен:

git remote add origin [Your HTTPS repository] 

Если вы получаете ошибки, запрашивающих ключи SSH.

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 
Смежные вопросы