- 先在GitHub上创建仓库
登陆到GitHub上,点击右上角“+”,选择New respository,开始创建新仓库
- 填写仓库名称kgc1,自定义,并选择Initialize this repository with a README,点击Create respository
则远程仓库创建成功。
- 将远程仓库克隆到本地
- 、点击Clone or download,复制弹出框里的地址
- 、在本地执行命令git clone https://github.com/fdd8/kgc1.git(git clone 上一步复制的地址)
- 、此时查看该目录下的文件,出现克隆的远程仓库名称kgc1,进入到该文件夹下,执行命令:git remote add origin https://fdd8@github.com/fdd8/kgc1.git
git push -u origin master