将网站上载到GitHub
我有一个网站项目,在我的桌面上有几个文件夹和子文件夹。我想把这个网站复制到GitHub。使用GitHub桌面应用程序时,最好的方法是什么?似乎我只能上载单个文件,但不能上载文件夹。打开ssh并键入以下内容:将网站上载到GitHub,github,Github,我有一个网站项目,在我的桌面上有几个文件夹和子文件夹。我想把这个网站复制到GitHub。使用GitHub桌面应用程序时,最好的方法是什么?似乎我只能上载单个文件,但不能上载文件夹。打开ssh并键入以下内容: cd [full project folder name] (eg ~/desktop/project1) git init git add . git commit -m "initial commit" git remote add origin git@github.com:[Your
cd [full project folder name] (eg ~/desktop/project1)
git init
git add .
git commit -m "initial commit"
git remote add origin git@github.com:[YourUSERNAME]/[YourREPOSITORY].git
git push -u origin master
步骤5可替换为:
git remote add origin [Your HTTPS repository]
如果请求ssh密钥时出错。(尽管您应该尽可能设置它们。)
两种方式:
使用命令行:
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
使用应用程序
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