步骤:
1、在github上创建一个空仓库
复制创建好后的仓库网址
2、终端准备工作
- 打开终端,输入克隆空仓库的命令(其中 your_name 表示你的github名字, your_repository_name 表示你的仓库名)
git clone https://github.com/your_name/your_repository_name.git
- 会生成一个以仓库名命名的文件夹,复制你所要的文件或文件夹到仓库文件夹里面
- 接着终端操作,进入仓库文件夹
ls (回车后,可以看到仓库文件夹)
cd your_repository_name (回车进入仓库文件夹,your_repository_name表示你的仓库名)
ls (可以查看你复制的文件)
3、git命令
- 开始将文件导入github中
git add file_name (file_name表示你要导入的文件或者文件名)
git commit -m "注解" (对文件添加一些注解)
- 需要导入n个